Error Reference

Semaphore wait timeout: request queued too long

Semaphore wait timeout: request queued too long

Where this appears

This error appears in the Application Log under System Diagnostics > Log > Application Log when a request has waited in the semaphore queue beyond the configured timeout period. It typically occurs during high system load or when long-running transactions occupy all available semaphore slots, preventing new requests from being processed.

Sourdough
Chrome Extension

Debugging this in a real instance?

Sourdough lets you trace "Semaphore wait timeout: request queued too long" through system logs, script errors, and API health in the ServiceNow tab you are already using.

Add to Chrome

Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.

Overview
Tasks
CMDB
API
Metrics
Monitor
Internals
Instance:sourdoughdev·Version:Yokohama
Instance StateONLINE
System StatusFully Operational
Session Timeout90 minutes
Logged-In Sessions2 (20 active)
Build Nameyokohama-12-18-2024_p1
IP Address10.159.128.43
Instance HealthHealth Score: 90%
🔥 5dSourdough (Chrome Plugin)Dark Mode

Cause

Long-running business rules, scheduled jobs, or import sets are consuming semaphore slots for extended periods, blocking other requests from processing. (high likelihood)

The glide.semaphore.max_permits system property is set too low for the current system load and concurrent user activity levels. (high likelihood)

Inefficient database queries or scripts without proper indexing are causing transactions to run longer than expected and hold semaphore slots. (medium likelihood)

The glide.semaphore.timeout system property is set too low, causing legitimate requests to timeout before completion during normal load periods. (medium likelihood)

System integration or web service calls are experiencing network delays or external system slowdowns, causing ServiceNow transactions to wait indefinitely. (low likelihood)

Fix

Step 1: Navigate to System Diagnostics > Stats > Semaphores to check current semaphore usage and identify which processes are holding slots for extended periods.

Step 2: Review the Application Log at System Diagnostics > Log > Application Log for concurrent long-running transactions or slow queries that occurred around the same time as the timeout error.

Step 3: Check the current values of glide.semaphore.max_permits and glide.semaphore.timeout system properties under System Properties > All to verify they are appropriate for your system load.

Step 4: If semaphore slots are consistently full, increase the glide.semaphore.max_permits value gradually (typically by 10-20 permits) and monitor system performance after each change.

Step 5: Identify and optimize any long-running business rules, scheduled jobs, or scripts by adding proper indexing, reducing query complexity, or breaking large operations into smaller chunks.

Step 6: Review any recent integrations or web service calls for potential delays and implement proper timeout handling or asynchronous processing where appropriate.

Step 7: If the timeout value is too restrictive, consider increasing glide.semaphore.timeout cautiously, but first ensure that underlying performance issues are addressed.

Step 8: Monitor semaphore usage trends over time using Performance Analytics or custom reporting to establish baseline metrics and identify recurring patterns.

Test Your Knowledge

Quick 3-question quiz. See how your ServiceNow skills stack up.

Question 1 of 3Performance

A list view on a table with millions of records is slow. Best fix?

Select an answer to continue