title: Instance of Google Compute Engine freezes trying to upload files on Google Cloud Storage
body: <p>I have wrote this shell script that download archives from a url list, decompresses them and finally moves them in a Cloud Storage bucket.</p>
  
  <pre><code>#!/bin/bash
  # declare STRING variable
  
  for iurl in $(cat ./html-rdfa.list); do
      filename=$(basename "$iurl")
      file="${filename%.*}"
      if gsutil ls gs://rdfa/$file; then
          echo "yes"
      else
          wget $iurl
          gunzip $filename
          gsutil cp -n $file gs://rdfa
          rm $file
          sleep 2
      fi
  done
  </code></pre>
  
  <p><em>html-rdfa.list</em> contains the url list. The instance is created using the debian 7 image provided by gooogle.</p>
  
  <p>The script run correctly for the first 5 or 6 files, but then the instance freezes and i have to delete the instance. The ram or the disk of the instance are not full when it freezes. </p>
  
  <p>I think the problem is caused by the command <em>gsutil cp</em>, but it is strange that CPU load is practically 0 and also the RAM is free but it is impossibilo to use the instance without restarting them.</p>