Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure WebJob timeout configuration settings

We have an Azure web site with a daily scheduled job. In our case, the scheduled job runs a stored procedure that takes about 10 minutes so there is no local processing. Our web job is terminating after about 4 minutes with this error.

Command 'cmd /c ...' aborted due to no output and CPU activity for 121 seconds. You may increase SCM_COMMAND_IDLE_TIMEOUT setting to solve the issue. 

We've tried adding the following app settings to the web job's app.config file:

<appSettings>     <add key="SCM_COMMAND_IDLE_TIMEOUT" value="100000" />     <add key="WEBJOBS_IDLE_TIMEOUT" value="100000" /> </appSettings> 

Those files are referenced in this document https://github.com/projectkudu/kudu/wiki/Web-jobs but they don't seem to have any effect. (still timing out after adding the settings to the app.config file)

Are we adding the configuration settings to the right place?

Thanks for the help.

like image 306
Ender2050 Avatar asked Oct 27 '14 21:10

Ender2050


People also ask

How do I change my Azure WebJob schedule?

To change the schedule, or to Modify the CRON value just use the App Service Editor to modify the WWWROOT/App_Data/jobs/triggered/YOUR_WEBJOB_NAME/settings. job file; By the time of writing, App Service Editor is still in preview but it will work.

What was aborted due to no output nor CPU activity for 120 seconds?

Webjob ...' was 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. This error happens if the job uses TimerTrigger. There are two reasons why your job will not get back positive life-tick.

What is Scm_command_idle_timeout?

SCM_COMMAND_IDLE_TIMEOUT=600. Note that on Azure, there is a general idle request timeout that will cause clients to get disconnected after 230 seconds. However, the command will still continue running server-side after that.


1 Answers

You need to set SCM_COMMAND_IDLE_TIMEOUT from the portal to your desired timeout value in seconds. For example, set it to 3600 for a one hour timeout.

Go to your website's config section, find the app settings section, and add the setting.

like image 193
Zain Rizvi Avatar answered Sep 28 '22 11:09

Zain Rizvi