Multiple stuck default semaphores alert due to pulling large report from sys_audit on "incident" tableIssue <!-- /*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: ; } } Multiple stuck default semaphores alert:semaphore thread page started age tid sid----------- ----------------- ---------------------- ------------------- ------- ------- --------------------------------<node> Default-thread-40 /report_viewer.do 2026-02-02 14:52:41 6:04:01 1370657 387AE98A873EB2D0CF2041550CBB3531<node> Default-thread-32 /report_viewer.do 2026-02-02 15:09:39 5:47:03 1372819 387AE98A873EB2D0CF2041550CBB3531 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: ; } } Any 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: ; } } User tries to pull large report from sys_audit on "incident" table: 2026-02-02 15:09:39 (099) Default-thread-32 SYSTEM txid=9add618a87be GlideServletTransaction *** WARNING *** GlideServlet:Transaction waited excessive time to run: 483319ms, semaphore wait: 0ms, session wait: 483319ms - transaction: #1372819 /report_viewer.do, user: 2026-02-02 15:09:39 (111) Default-thread-32 387AE98A873EB2D0CF2041550CBB3531 txid=9add618a87be Processor #1372819 /report_viewer.do Parameters ------------------------- sysparm_query=sys_created_on>=javascript:gs.dateGenerate('2025-07-01','00:00:00') sysparm_formatting_configuration={"table":"incident","stringFormattingProperties":{},"durationFormattingProperties":{},"dateFormattingProperties":{},"numberFormattingProperties":{}} Inefficient filter/query:-- large table sys_audit-- GROUP BY is used-- filter range is huge -- sys_audit0.`sys_created_on` >= '2025-07-01 07:00:00' Link: https://<instance_name>.servicenowservices.com/sys_query_pattern.do?sys_id=85ec294687beb2d0cf2041550cbb3578 sys_id: 85ec294687beb2d0cf2041550cbb3578 hash: -1763232696 count: 2 average: 224230.82 example: SELECT sys_audit0.`documentkey` AS `documentkey`, count(*) AS count_of_506688356 FROM sys_audit sys_audit0 WHERE sys_audit0.`sys_created_on` >= '2025-07-01 07:00:00' GROUP BY sys_audit0.`documentkey` ORDER BY sys_audit0.`documentkey` These transactions finally completed after almost 12hrs: 2026-02-03 02:41:49 (623) Default-thread-40 387AE98A873EB2D0CF2041550CBB3531 txid=fbcb6506877e tx_pattern_hash=2127345090 LocalhostTransactionLogger EXCESSIVE *** End #1370657 /report_viewer.do referer: /sys_report_template.do, user: guest, r_status: 200, render_size: 27392, total time: 11:49:08.060, processing time: 11:49:08.058, CPU time: 0:00:01.326, total wait: 0:00:00.002, semaphore wait: 0:00:00.002, SQL time: 0:04:18.039 (count: 125), ACL time: 0:00:00.002, Script time: 0:00:00.026 (count: 386), Total memory allocated: 572.7MB, source: 69.62.194.9, type: report, Speed: 0, ISS: true, origin scope: sn_hr_sp, app scope: sn_hr_sp 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: ; } } Reporting on the sys_audit table in ServiceNow is generally discouraged due to performance issues caused by its massive size.> Instead of direct reporting, use Database Views to join sys_audit with target tables (e.g., incident) or use Metric Definitions for specific field tracking.a) Create a new Database View that joins sys_audit (alias: adt) and the table you want to audit (e.g., incident, alias: inc)https://www.servicenow.com/community/developer-forum/how-can-i-extract-report-from-sys-audit-table-along-with-the/m-p/1628847b) For tracking field changes over time, define a Metric. This is much more efficient than querying sys_audit.https://www.servicenow.com/community/developer-forum/is-there-a-way-to-report-on-audits-in-a-way-that-is-efficient-or/m-p/1450685