title: Google Drive C# SDK: downloadFunction freezes after 1000+ files downloaded (ca. 500MB)
body: <p>I'm trying to download a File and Folder structure onto a local folder. The problem is that the download function halts after downloading ca. 420 files (520MB). The problem occurs after ca 15 minutes.</p>
  
  <p>The dowload function looks like this:</p>
  
  <pre><code>public async Task DownloadFileAsync(DriveService service, File f, string path)
      {
          var downloader = new MediaDownloader(service);
          downloader.ChunkSize = DownloadChunkSize;
  
          System.IO.File.AppendAllText(@"C:\Users\carl\Desktop\log1.txt", path + "\r\n");
  
          using (var fileStream = new System.IO.FileStream(path,
              System.IO.FileMode.Create, System.IO.FileAccess.Write))
          {
              var progress = await downloader.DownloadAsync(f.SelfLink, fileStream);
  
              // updating the modified date
              await service.Files.Touch(f.Id).ExecuteAsync();
  
              if (progress.Status == DownloadStatus.Completed)
              {
                  Console.WriteLine(path + " was downloaded successfully");
              }
              else
              {
                  Console.WriteLine(Environment.NewLine + "Download {0} was interpreted in the middle. Only {1} were downloaded. ",
                      path, progress.BytesDownloaded);
              }
          }
      }
  </code></pre>
  
  <p>Could it be that my DriveService can time out? But I'm not getting any errors...</p>