问题
I've tried zipping up a console app and uploading it to Azure as a WebJob, as I've done with others, but the upload fails. No explanation is given.
So then I tried FTPing it up there. I put it in
/site/wwwroot/App_Data/jobs/triggered/FeedbackNotifications
Where "FeedbackNotifications" is the name of my WebJob. I took the path from this site.
The upload completes and I can see the WebJob listed in the Azure portal. However, when I click "Run once" it fails. The log file contains the following:
[05/20/2015 15:26:22 > e5f596: SYS INFO] Status changed to Initializing
[05/20/2015 15:26:23 > e5f596: SYS INFO] Status changed to Failed
[05/20/2015 15:26:23 > e5f596: 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 System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.Abstractions.FileWrapper.Copy(String sourceFileName, String destFileName, Boolean overwrite) at Kudu.Core.Infrastructure.FileSystemHelpers.CopyDirectoryRecursive(String sourceDirPath, String destinationDirPath, Boolean overwrite) at Kudu.Core.Jobs.BaseJobRunner.b__0() at Kudu.Core.Infrastructure.OperationManager.<>c__DisplayClass1.b__0() at Kudu.Core.Infrastructure.OperationManager.Attempt[T](Func`1 action, Int32 retries, Int32 delayBeforeRetry, Func`2 shouldRetry) at Kudu.Core.Infrastructure.OperationManager.Attempt(Action action, Int32 retries, Int32 delayBeforeRetry) at Kudu.Core.Jobs.BaseJobRunner.CacheJobBinaries(JobBase job, IJobLogger logger) [05/20/2015 15:26:23 > e5f596: SYS INFO] Status changed to Failed [05/20/2015 15:26:23 > e5f596: SYS ERR ] WebJob run failed due to: System.InvalidOperationException: Missing working directory at Kudu.Core.Jobs.BaseJobRunner.InitializeJobInstance(JobBase job, IJobLogger logger) at Kudu.Core.Jobs.TriggeredJobRunner.<>c__DisplayClass2.b__0(Object _)
The total size of the directory that contains everything is 115MB.
I've also read this page which suggests that long file names may be the cause of the fault, but I've no file names longer 69 characters.
UPDATE: I've noticed that when I try an additional WebJob which previously worked, it incurs the same error.
回答1:
When the WebJob is invoked the first time (or when its binaries are updated), it is first copied to the %TEMP%
directory and will run from there.
Free (sku) azure websites have a limited amount of disk space in the Temp directory (actually in d:\local
) which is 500MB.
It seems you have reached it and so WebJob fails to start.
To verify you can go to your scm site's debug console (https://{sitename}.scm.azurewebsites.net/DebugConsole) and query for the free space on d:\local
(pushd d:\local
or clicking on the Earth button).
来源:https://stackoverflow.com/questions/30354377/azure-webjobs-there-is-not-enough-space-on-the-disk