Audit history list or calendar of a record times out on a specific recordIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } When selecting List Controls on a form, then selecting History and then Calendar or List, the page takes a very long time to load and the transaction times out. This only happens on certain records with , not all records. This is related to PRB645035. There is no permanent fix because it is expected behavior for the history set to take a very long time when a record has a large volume of audit history. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } All releases Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Every time the history List is selected, the following UI action runs to create the history set — if no existing history set exists, if the history set has expired after one month, or if updates were made to the record: UI Action - Show History https://<instance-name>.service-now.com/sys_ui_action.do?sys_id=<ui-action-sys-id> Object Type: UI Action [sys_ui_action] Sys ID: <ui-action-sys-id> Field Name: script Line Number: 2 Function Name: script 1: var hs = new GlideHistorySet(current); 2: >>> var sys_id = hs.generate(); 3: 4: action.setRedirectURL("sys_history_set.do?sys_id=" + sys_id); 5: action.setReturnURL(current); Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } There are three solutions available. **Solution One:** Delete old audit data and reduce the audit record count to fewer than 1,000 for the specific record that is slow to load the `sys_history_set`. This approach reduces audit table size and improves long-term performance. **Solution Two:** 1. Go to https://<InstanceName>.service-now.com/sys.scripts.do 2. Run the following script to manually build the history set for the specific record that has too many audit records. - Make sure the `sys_id` in the following script is the `sys_id` of the record for which the history set is being built. - Because the script takes a long time to run, open a new browser in incognito or private mode and sign in to ServiceNow again to continue other work while the script runs, so the current session is not affected. //------------------------------Start Code--------------------------------------- // -- GlideHistorySet will accept either a GlideRecord object or (table,sys_id) as parameters. // -- For dynamically fetched records, use the following or a GlideRecord Query to fetch multiple and iterate //var gr = new GlideRecord('incident'); //gr.get('number','INC000123'); //var hs = new GlideHistorySet(gr); //var sys_id = hs.generate(); var hs = new GlideHistorySet('incident','<record-sys-id>') //<----------- For a single targeted record var sys_id = hs.generate(); //----------------------------END CODE----------------------------------------- **What is `session_wait_time`?** This occurs when a user runs too many transactions in parallel at the same time. A user can only access one transaction at a time by design. This happens when a user has too many ServiceNow tabs open and works too quickly. For example: if a form is accessed or saved and then another form is immediately accessed or saved before the first transaction finishes, the second transaction waits for the first to complete. Opening a new browser in incognito or private mode allows two transactions to run in parallel instead of one. **Solution Three:** Use the same code from Solution Two in the following two ways: 1. Add it to a scheduled job so it runs once a month. 2. Add it to an async business rule so it runs every time the record with too many audit records is updated.