Azure web job aborted due to no output

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.

  1. #1 by Luis Hernández on February 9, 2015 - 4:04 pm

    Hello there my good sir,

    I’ve been dealing with the same error (SCM_COMMAND_IDLE_TIMEOUT) and I still can’t figure it out why my WebJob keeps failing. It’s a scheduled WebJob and it does what it’s required but after some time it keeps saying on the run details that whe job failed but on the functions invoked it says “Success” on the very one function I run. Weird. How can something that succeded, fail?

    • #2 by scottstoecker on April 28, 2015 - 5:04 pm

      That is odd. I would try building in some logging into your web job and logging messages to a SQL table or an Azure data storage object (like a table) to see what exactly is happening.

  2. #3 by Karen Snyder on December 22, 2015 - 1:02 pm

    I also had the problem that although the invoked function was successful, a scheduled Azure WebJob failed with error “aborted due to no output nor CPU activity for 121 seconds. You can increase the SCM_COMMAND_IDLE_TIMEOUT app setting (or WEBJOBS_IDLE_TIMEOUT if this is a WebJob) if needed”. I solved the problem by removing a Console.ReadLine statement from the Main program of the WebJob, which had been written as a C# Console application.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: