2
votes

I have a continuous running web job which starts long running process on a background thread. I have enabled Application logging to write all the logs into a storage table.

Sometimes the web job automatically restarts for no apparent reason and nothing is logged in the storage table. Below is the log information from the storage table

Screen Capture of my log

I assume whenever the web job stops it should write into the logs (first line in the below screen capture).

enter image description here

I looked at the memory and CPU consumption of the web app and it was always below 50% during the entire month.

I am using "Basic" pricing tier for the web app and set the "Always On" to true.

How to find out what is the reason behind the web job shutting down? Is there any other place where I can look for more detailed log?

EDIT Below is the logs from the scm site which still does not say why it stopped :(

enter image description here

EDIT 2 In the log I found some more information.

Could not send heartbeat. Access to the path 'C:\DWASFiles\Sites\MyWebApp\VirtualDirectory0\data\DaaS\Heartbeats\RD000D3A702E55' is denied.
  at DaaSRunner.Program.Main(String[] args)
  at DaaSRunner.Program.StartSessionRunner()
  at DaaS.HeartBeats.HeartBeatController.<GetHeartBeats>d__8.MoveNext()
  at DaaS.HeartBeats.HeartBeatController.GetNumberOfLiveInstances()
  at DaaSRunner.Program.SendHeartBeat()
  at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source, Func`2 predicate)
  at System.IO.File.Delete(String path)
  at System.IO.File.InternalDelete(String path, Boolean checkHost)
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at DaaS.HeartBeats.HeartBeat.OpenHeartBeat(String heartBeatPath)

Any help?

1
Edit 2 is a red herring. That's a log outputted by the DaaS site extension for when two different instances of the same site try to write to the same file. The second one to try to get the write lock will get access denied since the first instance currently holds the handle.Zain Rizvi

1 Answers

2
votes

Look at the WebJob's log file for system logs.

You can get to it by going to the WebJobs dashboard - https://{sitename}.scm.azurewebsites.net/azurejobs