Service Portal Widget Server Script Timeout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2018 08:33 AM
Hi Everyone,
I'm trying to query and get a large amount data (around 30k of records) from the table using GlideRecord in Server Side in the widget. But seems there is some timeout for widgets server side scripts. It send me "failed to load resource: the server responded with a status of 500 (Internal Server Error)" in browser console after 300 sec.
This script in background script completes succesfully (after 380 sec).
Tried to move logic in script include, but the same result.
Perhaps there is some solution?
Thanks for answers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2018 08:39 AM
Is there a reason you need all 30K records at once? You may want to consider breaking it down/paginating. In any case, you could try using the table REST API instead of querying in the server script. This would be done asynchronously in the client script. You can inject $http into your widget's client script function to make the process a little easier.