0

I'm getting the following error when running my continuous webjob.

An unhandled exception of type 'Microsoft.WindowsAzure.Storage.StorageException' occurred in Microsoft.Azure.WebJobs.Host.dll

Additional information. The client could not finish the operation within specified timeout.

My webjob is triggered by an Azure Storage Queue. The webjob starts fine and runs for around 8-10 minutes when a message arrives in the queue, before then it just stops running. At this point it starts processing that message again and the webjob again runs for 8-10 minutes. This loop continues until I stop the webjob manually.

I managed to get the error above by remotely debugging the webjob. I get a popup in visual studio after 8-10 minutes - StorageException was unhandled.

Is there a default timeout between the webjob and the Azure Queue / Blob storage?

Really stuck with this one, so any help appreciated.

RichieRoo
  • 499
  • 1
  • 5
  • 10
  • When you get this exception, if you look at `RequestInformation` property of the exception, you should see more details. Can you please share that? – Gaurav Mantri Sep 13 '16 at 12:56
  • When I get the exception, it's just a popup in visual studio but I cannot see anywhere to see more details about the exception. – RichieRoo Sep 13 '16 at 13:44

1 Answers1

0

As far as I know, the following settings could be the possible cause:

  • WEBJOBS_IDLE_TIMEOUT - Time in seconds after which we'll abort a running triggered job's process if it's in idle, has no cpu time or output. The default value is 2 minutes.
  • SCM_COMMAND_IDLE_TIMEOUT - By default, when your build process launches some command, it's allowed to run for up to 60 seconds without producing any output.

According to your description, please try to increase "SCM_COMMAND_IDLE_TIMEOUT" and "WEBJOBS_IDLE_TIMEOUT" settings for your WebJob and find out whether it could work on your side and the Azure side.

You could add the following settings in the appSettings section of the app.config file in your WebJob project.

<appSettings>
    <add key="SCM_COMMAND_IDLE_TIMEOUT" value="3600" /> <!--1 hour-->
    <add key="WEBJOBS_IDLE_TIMEOUT" value="3600" /> <!--1 hour-->
</appSettings>

Or

You could log in to Azure Portal, choose the web app which hosts your WebJob, click SETTINGS > Application settings, add the settings as the above in the App settings section.

Bruce Chen
  • 17,123
  • 2
  • 14
  • 27