简体   繁体   中英

Azure Web Jobs long history affecting app service plan performance

I have been running my web jobs for a few months now and the history includes hundreds of thousands of instances when some of them ran, mainly TimerTriggers. When I go in the portal to the "Functions" view of web jogs logs I have noticed that my app service plan shoots up to 100% CPU while I am sat on that page. The page constantly says "Indexing...."

When I close the "Functions" view down the CPU goes straight back down to a few percent, it's normal range.

I assume it must be down to the fact that it has been running for so long and the number of records to search through is so vast. I cannot see any option to archive or remove old records of when jobs ran.

Is there a way I can reduce the history of the jobs? Or is there another explanation?

I'm not familiar with Azure Web Jobs, but I am familiar with Azure Functions which is built on top of Web Jobs, so this might work.

In Azure Functions, each execution is stored in Azure Storage Table. There, you can see all of the parameters that were passed in, as well as the result. I could go into the Storage Table and truncate the records I do not need, so you might be able to do the same with Web Jobs.

Here is how to access this information: Table Storage in markheath.net/post/three-ways-view-error-logs-azure-functions

在此处输入图片说明

Based on your description, I checked my webjob and found the related logs for azure webjobs dashboard as follows:

在此处输入图片说明

For Invocation Log Recently executed functions, you could find them as follows:

在此处输入图片说明

Note: The list records for Invocation Log are under azure-webjobs-dashboard\\functions\\recent\\flat , the detailed invocation logs are under azure-webjobs-dashboard\\functions\\instances .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM