question

Deep-6702 avatar image
0 Votes"
Deep-6702 asked Grmacjon-MSFT edited

What is the limit of Azure webjob logs?

As per https://github.com/projectkudu/kudu/wiki/WebJobs

I know that WEBJOBS_HISTORY_SIZE - Maximum number of runs kept in the history directory for a triggered job. The default is 50.

But what is the maximum number of logs that can be allowed in history?

azure-webapps-webjobs
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Grmacjon-MSFT avatar image
2 Votes"
Grmacjon-MSFT answered Grmacjon-MSFT edited

Hi @Deep-6702

I heard back from the engineering team and they said there isn’t a hardcoded maximum.

kudu/DeploymentSettingsExtension.cs at master · projectkudu/kudu (github.com)


 public static int GetWebJobsHistorySize(this IDeploymentSettingsManager settings)
     {
         string value = settings.GetValue(SettingsKeys.WebJobsHistorySize);
         int maxJobRunsHistoryCount;
         if (Int32.TryParse(value, out maxJobRunsHistoryCount) && maxJobRunsHistoryCount > 0)
         {
             return maxJobRunsHistoryCount;
         }
    
         return DefaultMaxJobRunsHistoryCount;
     }

There would be a balance between setting higher numbers for these values and not consuming too much disk space.

An alternative is to consider enabling Application Insights logging: Tutorial for event-driven background processing with the WebJobs SDK - Azure App Service | Microsoft Docs

Hope that helps.

Best,
Grace





5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.