124 views

Localhost log file size limits



Problem


This highlights the steps to increase the number of log statements per transaction logged in the node logs, or localhost file.

 

Symptoms


The localhost logs for the scheduled job are not visible even though the job is executing. 

 

Cause


  • Some scheduled jobs can run for a long time and log too many statements into the node logs (localhost logs).
  • The number of log statements increase when the customer has enabled  debug or warning statements.

For example, as per below statements, the DEBUG and warning statements related to workflow that were noticed in the node logs of the instance throughout the execution of the scheduled job:

2017-11-08 01:54:50 (104) worker.2 worker.2 DEBUG: completed Wait 50 percent of SLA duration(a89567b813ee3200f5db52722244b05e): event=execute
2017-11-08 01:54:50 (146) worker.2 worker.2 DEBUG: completed Join all(1095237813ee3200f5db52722244b027): event=execute
2017-11-08 01:54:50 (190) worker.2 worker.2 DEBUG: completed Join all(1095237813ee3200f5db52722244b027): event=activityComplete
2017-11-08 01:54:50 (532) worker.2 worker.2 WARNING *** WARNING *** Get for non-existent record: task_sla:2d8b84bddb16470420f6546adc9619c4, initializing
2017-11-08 01:54:50 (653) worker.2 worker.2 DEBUG: completed Join all(1095237813ee3200f5db52722244b027): event=cancel
2017-11-08 01:54:50 (673) worker.2 worker.2 DEBUG: completed Wait 50 percent of SLA duration(a89567b813ee3200f5db52722244b05e): event=cancel
2017-11-08 01:54:52 (405) worker.2 worker.2 *** Script: Updating incident 5824b260dbe6b24c9246f1051d961946
2017-11-08 01:54:52 (955) worker.2 worker.2 DEBUG: completed Begin(d89567b813ee3200f5db52722244b043): event=execute

After the limit of 200,000 log statements for the transaction (in this case Scheduled Job) is reached below WARNING message will be seen in the node logs:

2017-11-08 01:54:57 (277) worker.2 worker.2 WARNING *** WARNING *** Maximum per transaction log statements (200000) reached. Suppressing further logging

As soon as the threshold of 200,000 transaction log statements is reached, there would be no more logs about the job entered into the localhost file. However, the job execution will continue.

  

Resolution


The limit for node logs per transaction can be increased by Creating a system property glide.transaction.max_logs with value 400,000.

The steps to add the system property is mentioned below:

  1. Navigate to System Properties > All properties
  2. Click New
  3. Name = glide.transaction.max_logs
  4. Type = integer
  5. Value = 400000

Notes:
  • The first step should always be to turn off the DEBUG and the warning statements. Changing the system property glide.transaction.max_logs should be done as a last resort.
  • The Node log/localhost log file has size limit of 2GB after which the logs start getting auto truncate.

Article Information

Last Updated:2018-01-26 11:35:42
Published:2018-01-03