title: Azure WebJob: There is not enough space on the disk
body: <p>I am getting an error on my Azure WebJob about not being enough space on the disk. I had it earlier, so I moved it to <code>Standard 1</code> which says it comes with 50GB.</p>
  
  <p>Here is the error I get:</p>
  
  <pre><code>[08/29/2019 05:19:04 &gt; cd1c7c: SYS ERR ] Failed to copy job files: System.IO.IOException: There is not enough space on the disk.
  
     at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
     at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
     at Kudu.Core.Infrastructure.FileSystemHelpers.CopyDirectoryRecursive(String sourceDirPath, String destinationDirPath, Boolean overwrite) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\FileSystemHelpers.cs:line 241
     at Kudu.Core.Infrastructure.FileSystemHelpers.CopyDirectoryRecursive(String sourceDirPath, String destinationDirPath, Boolean overwrite) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\FileSystemHelpers.cs:line 235
     at Kudu.Core.Infrastructure.FileSystemHelpers.CopyDirectoryRecursive(String sourceDirPath, String destinationDirPath, Boolean overwrite) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\FileSystemHelpers.cs:line 235
     at Kudu.Core.Jobs.BaseJobRunner.&lt;&gt;c__DisplayClass49_0.&lt;CacheJobBinaries&gt;b__0() in C:\Kudu Files\Private\src\master\Kudu.Core\Jobs\BaseJobRunner.cs:line 188
     at Kudu.Core.Infrastructure.OperationManager.&lt;&gt;c__DisplayClass2_0.&lt;Attempt&gt;b__0() in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\OperationManager.cs:line 17
     at Kudu.Core.Infrastructure.OperationManager.Attempt[T](Func`1 action, Int32 retries, Int32 delayBeforeRetry, Func`2 shouldRetry) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\OperationManager.cs:line 42
     at Kudu.Core.Infrastructure.OperationManager.Attempt(Action action, Int32 retries, Int32 delayBeforeRetry) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\OperationManager.cs:line 19
     at Kudu.Core.Jobs.BaseJobRunner.CacheJobBinaries(JobBase job, IJobLogger logger) in C:\Kudu Files\Private\src\master\Kudu.Core\Jobs\BaseJobRunner.cs:line 179
  [08/29/2019 05:19:06 &gt; cd1c7c: SYS INFO] Status changed to Failed
  [08/29/2019 05:19:06 &gt; cd1c7c: SYS ERR ] WebJob run failed due to: System.InvalidOperationException: Missing working directory
     at Kudu.Core.Jobs.BaseJobRunner.InitializeJobInstance(JobBase job, IJobLogger logger) in C:\Kudu Files\Private\src\master\Kudu.Core\Jobs\BaseJobRunner.cs:line 232
     at Kudu.Core.Jobs.TriggeredJobRunner.&lt;&gt;c__DisplayClass10_1.&lt;StartJobRun&gt;b__0(Object _) in C:\Kudu Files\Private\src\master\Kudu.Core\Jobs\TriggeredJobRunner.cs:line 78
  </code></pre>
  
  <p>When I go to the Console and do a <code>dir</code> I see plenty of disk space...
  <a href="https://i.stack.imgur.com/xt1p6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xt1p6.png" alt="enter image description here"></a></p>
  
  <p>And when I go to Kudu and look at the environment I see this...
  <a href="https://i.stack.imgur.com/NnKTO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NnKTO.png" alt="enter image description here"></a></p>
  
  <p>What I'm not sure about is the difference between <code>D:\home</code> and <code>d:\local</code> b/c I think <code>Home</code> has plenty of space, but <code>local</code> maybe not?</p>
  
  <p>The code for the app is not large, but it does download some big files from an FTP site, then uncompress them on disk and send them up to the S3 cloud.</p>
  
  <p>So I can see storage being an issue on <code>local</code> but <code>Home</code> should have plenty.</p>
  
  <p>I can see the files download and uncompress on the <code>Home</code> directory in the Console, but does all this happen in the background on <code>local</code> first and then get copied over after the app runs or something?</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>NOTE:
  I have reviewed this post:
  <a href="https://stackoverflow.com/questions/30354377/azure-webjobs-there-is-not-enough-space-on-the-disk">Azure WebJobs: There is not enough space on the disk</a>
  - Seems pretty old, also OP was able to resolve with a higher plan. This did not work for me.</p>
  
  <p>UPDATE: Per recommendation, adding answers to common questions regarding <a href="https://github.com/projectkudu/kudu/wiki/Reporting-WebJobs-issues" rel="nofollow noreferrer">WebJobs issues</a>...
  1) This is a triggered WebJob that is scheduled to run once a day with CRON</p>
  
  <p>2) It is being deployed by publishing directly from inside Visual Studio Pro 2017, settings below.</p>
  
  <p><a href="https://i.stack.imgur.com/os3eH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/os3eH.png" alt="Publish Settings 1"></a></p>
  
  <p><a href="https://i.stack.imgur.com/CxdUK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CxdUK.png" alt="Publish Settings 2"></a></p>
  
  <p>3) It is written in C#.net Core 2.2 as a Console Application</p>
  
  <p>4) I am NOT using the WebJobs SDK</p>
  
  <p>UPDATE 2: Also <a href="https://github.com/projectkudu/kudu/issues/3021" rel="nofollow noreferrer">posted on GitHub</a></p>