Cannot deploy to web app: Not enough space on the disk

Krishna Moniz 5 Reputation points
2026-02-20T15:06:51.1966667+00:00

Issue

When trying to deploy to my azure app service, I get a not enough space on the disk error.

Initiating deployment
Deploying from local path: C:\KBs\OffshoreTreatment_Development\ot-azv-test-origin\Deploy\AZURE\azv_deploy_20260218092653.zip
An error occurred during deployment. Status Code: 500, Details: {"Message":"An error has occurred.","ExceptionMessage":"There is not enough space on the disk.\r\n","ExceptionType":"System.IO.IOException","StackTrace":"   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r\n   at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)\r\n   at System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)\r\n   at System.IO.Stream.<>c.<BeginWriteInternal>b__46_0(Object <p0>)\r\n   at System.Threading.Tasks.Task`1.InnerInvoke()\r\n   at System.Threading.Tasks.Task.Execute()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.IO.Stream.EndWrite(IAsyncResult asyncResult)\r\n   at System.IO.FileStream.EndWrite(IAsyncResult asyncResult)\r\n   at System.IO.Stream.<>c.<BeginEndWriteAsync>b__53_1(Stream stream, IAsyncResult asyncResult)\r\n   at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Kudu.Services.ByteRanges.HttpRequestMessageExtensions.<CopyToAsync>d__1.MoveNext() in C:\\__w\\1\\s\\Kudu.Services\\ByteRanges\\HttpRequestMessageExtensions.cs:line 67\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Kudu.Services.Deployment.PushDeploymentController.<>c__DisplayClass16_0.<<PushDeployAsync>b__0>d.MoveNext() in C:\\__w\\1\\s\\Kudu.Services\\Deployment\\PushDeploymentController.cs:line 519\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Kudu.Contracts.Infrastructure.LockExtensions.<LockOperationAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Kudu.Services.Infrastructure.LockExtensions.<LockHttpOperationAsync>d__1.MoveNext() in C:\\__w\\1\\s\\Kudu.Services\\Infrastructure\\LockExtensions.cs:line 30\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n   at Kudu.Services.Deployment.PushDeploymentController.<PushDeployAsync>d__16.MoveNext() in C:\\__w\\1\\s\\Kudu.Services\\Deployment\\PushDeploymentController.cs:line 498\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n   at Kudu.Services.Deployment.PushDeploymentController.<OneDeploy>d__14.MoveNext() in C:\\__w\\1\\s\\Kudu.Services\\Deployment\\PushDeploymentController.cs:line 434\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"}, Please visit https://ot-azv-test.scm.azurewebsites.net/api/deployments/latest to get more information about your deployment

When I check File system storage in my service plan it clearly shows that I have enough space.

I have made previous deployments to the web app. This is my 5th deployment to the web app (in the last ~6months)

What is wrong here and how can I resolve it?

Attempt to resolve

Clean up files

I tried restarting the web app. I tried deleting all temporary files. I took all the steps described in How to troubleshoot temporary storage on Azure App Service Nothing helped.

Upgrade to different tier (D1)

The web app is in F1 (free) service plan. I upgraded to D1, the problem persisted (note: both F1 and D1 have 1Gb of remote storage)

Upgrade to different tier (B1)

I upgraded to B1 and could deploy (B1 has 10Gb of remote storage). Next tried to downgrade back to either D1 or F1 and could not.

I get the following error:

Scale operation failed: Storage usage quota exceeded. Cannot update or delete a server farm. Your current usage is 2383 Mb and quota after the operation will be 2048 Mb. Please make sure your file system storage of the remaining App Service Plans in this ResourceGroup and Region is below the combined limit of the target pricing tier's.

However, when I check the File system storage, it says that I'm only using 418.67 Mb.

Assumptions/findings

I get the impression that the web app is not properly cleaning up temporary files and not properly reporting disk usage, nor giving me the ability to clean up the temporary files myself.

How do I resolve the not enough space on the disk error?

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


1 answer

Sort by: Most helpful
  1. AI answer

    2026-02-20T15:07:08.0266667+00:00

    The error message you're encountering, not enough space on the disk, typically indicates that your Azure App Service is hitting its storage quota limits. Here are some steps and considerations to help resolve this issue:

    1. Check Disk Quota: Even though the File system storage shows you are using 418.67 Mb, the actual quota can be affected by temporary files and other hidden storage usage. Ensure that you are not exceeding the limits set for your current pricing tier.
    2. Temporary Storage: Azure App Service uses temporary storage that can fill up quickly. If your application is generating a lot of temporary files, this can lead to the error you are seeing. You may want to investigate the usage of temporary storage and clean it up. Follow the guidance in the article on how to troubleshoot temporary storage to ensure you are managing this effectively.
    3. Upgrade Plan: You mentioned that upgrading to B1 allowed you to deploy successfully. This suggests that your application may require more storage than what is available in the F1 or D1 plans. If you need to downgrade back to a lower tier, ensure that your total storage usage is below the limits of that tier. You may need to clean up additional files or reduce the overall size of your application.
    4. Deployment Artifacts: Ensure that previous deployment artifacts are not consuming space. Sometimes, old deployments can leave residual files that take up space. You can check the Kudu console to see if there are any old files that can be deleted.
    5. Monitoring Disk Usage: Continuously monitor your disk usage through the Azure portal to ensure that you are aware of how much space is being used and what is consuming it. This can help prevent future issues.
    6. Contact Support: If you continue to encounter issues despite following these steps, consider reaching out to Azure support for assistance, as they can provide more detailed insights into your specific environment and usage.

    By following these steps, you should be able to address the not enough space on the disk error and manage your Azure App Service storage more effectively.

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.