My long-running (but fun-loving) web job because un-loving when it failed, and I saw this error in the log:
[01/24/2015 13:44:48 > 0298bf: SYS INFO] Status changed to Initializing
[01/24/2015 13:44:48 > 0298bf: SYS INFO] Run script ‘ScottsProgram.AzureWebJob.exe’ with script host – ‘WindowsScriptHost’
[01/24/2015 13:44:48 > 0298bf: SYS INFO] Status changed to Running
[01/24/2015 13:48:49 > 0298bf: ERR ] Command ‘cmd /c ScottsProgram.AzureWebJob …’ aborted due to no output and CPU activity for 121 seconds. You may increase SCM_COMMAND_IDLE_TIMEOUT setting to solve the issue.
cmd /c ScottsProgram.AzureWebJob.exe
[01/24/2015 13:48:49 > 0298bf: SYS INFO] Status changed to Failed
So I did my due diligence (I spent a lot of time in large corporate environments in the not so distant past) and found that setting the SCM_COMMAND_IDLE_TIMEOUT variable in the “app settings” section of my Azure web site was the way to go. So I did that and… it did nothing. Same error.
So I did further due diligence and found another suggestion to use the WEBJOBS_IDLE_TIMEOUT app setting. I set that one to an acceptably high value (3600 is a great number), and this one worked, and my web job became loving again.