- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi ServiceNow Community,
My PDI shows as Online in the Developer Portal, but the instance has been almost unusable since yesterday.
Symptoms:
- Scripts - Background returns 504 Gateway Time-out / snow_adc
- Logout can also return 504
- Normal browser and incognito both affected
- Browser sometimes reports ServiceNow pages as unresponsive
- cancel_my_transactions.do says: “All transactions have completed, nothing to cancel”
- User Sessions list mostly shows already invalidated sessions
- Standard pages sometimes load, but the instance is extremely slow/unstable
/stats.do shows:
- Instance state: ONLINE
- Build: Australia
- Servlet free memory: 2%
- Default semaphore queue depth: 10
- Queue age: 12:58:37
- Currently waiting on session synchronizer: 10
- Mean time waited so far: 5:02:06
- OS load average: 45.22 / 55.10 / 92.30
- DB latency: 2
- Background scheduler workers idle
- Database pool online and not busy
Transaction Log only shows completed small REST/UI transactions. I do not see anything obvious to cancel from the UI.
It looks like the PDI is online but the backend node is stuck / memory-starved / blocked. Is there any way to recover this PDI or trigger a backend restart without resetting or wiping the instance?
I do not want to release/reset the instance because I have application work on it.
Thank you in advance
Jakub
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @JakubGiza
A 504 Gateway Time-out during a Background Script typically indicates that the script execution exceeded the timeout limit enforced by the platform, browser, or proxy server. This often happens when processing large datasets or waiting for slow external integrations.
Recommended actions:
- Terminate the current job or transaction if it is still running.
- Clear the instance cache using cache.do.
- For scripts that process large volumes of data, avoid using the Background Scripts page. Instead, create a Fix Script (System Definition > Fix Scripts). Fix Scripts are trackable, can be monitored, and continue executing even if the browser session times out.
- Use setLimit() on GlideRecord queries whenever possible to reduce the number of records retrieved in a single execution.
- Process records in small, manageable batches (like 50–100 records per execution) to minimize execution time and reduce the risk of node lock-ups or timeouts.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @JakubGiza ,
If your issue is fixed , close the thread by accepting the correct solution ,so that other reader find the correct answer easily.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
ahoj @JakubGiza,
I wrote this article about 502, the 504 is mentioned in the end of the article:
[GF#5] PDI in Offline state: Resolving Error 502 Bad Gateway (snow_adc)
Hope it can help to resolve that issue!
TL;DR it happens to me all the time, just give it a few minutes and continue
✂-----Cutting-out-the---✦AI-noise✦---All-replies-written-and-vouched-for-by-GlideFather---