37 views

Description

On task records that use SLA functionality, the OOB UI action Show SLA Timeline, when clicked for records that have large journal fields (like incidents), can cause the application node to run out of memory.

Steps to Reproduce

  1. Pick an active incident on a test instance. 
  2. Modify the attached script to use that incident number. 
  3. Run the script in background scripts. It populate work notes and comments with some long text.
  4. Open another tab with stats.do pages
  5. Go to that incident and click on Show SLA Timeline. Refresh the stats.do page and observe the memory increase.

Workaround

This problem was fixed in Kingston Patch 4, and was due to the SLA Timeline keeping in memory all the record Display Values for all the updates of a given record, including journal fields. The Display Value of a journal field gets the complete journal field, not only the text written at a particular update, therefore it holds the whole journal field times the number of updates of a record. This might become massive when large journal fields are written in records with many updates, running out of memory.

On older releases, since journal fields are not particularly relevant in the timeline view, the workaround consists of modifying the Script Include 'SLAUtilSNC' [sys_id = 1a9fdd9b9f6322002920bde8132e70e1] used by the timeline view such that it ignores the journal fields when building the record information:

- locate the method:

grToJsObj

- inside the method, locate the lines:

     } else
          obj[fieldName].display_value = gr.getDisplayValue(fieldName);

- replace with:

     } else {
         var ed = gr.getElement(fieldName).getED();
         if (! (ed.isJournal() || ed.isJournalList()))
             obj[fieldName].display_value = gr.getDisplayValue(fieldName);
     }

 

Save the record, keeping in mind any customer update needs to be removed before upgrading, and re-applied afterwards if needed.

 


Related Problem: PRB1242878

Seen In

There is no data to report.

Intended Fix Version

London

Fixed In

Kingston Patch 4

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-07-11 10:05:57
Published:2018-06-28