GlideRecord Not Inserting All Records in Scripted SOAP Integration

Carlos Petrucio
Mega Sage

Hello,

I'm working on a scripted SOAP integration that receives an array of records (around 300 per request) and processes them using GlideRecord in a Script Include. The SOAP request arrives every 1 second, and in the logs I can confirm that the payload is fully received each time.

However, I'm facing an issue where:

  • The first few requests are processed successfully.

  • Starting from the third or fourth request, the script stops processing all items — for example, it processes only 65 out of 300 and then silently stops.

  • No exceptions are thrown, and no errors appear in the logs.

  • The records are not inserted, even though they are present in the input XML and logged correctly before processing.

I've checked for ACLs, GlideRecord failures, and added logging around insert() and update() calls. Nothing abnormal appears, and I can't find a reason why the script stops processing the remaining records.

Questions:

  1. Is there a known limit or throttle on how many records can be processed using GlideRecord in a scripted SOAP integration?

  2. Could ServiceNow be silently blocking further inserts due to performance, governance rules, or protection mechanisms?

  3. What's the recommended approach for importing large batches of records via SOAP in near real-time (1 request/sec)?

  4. Where can I track execution time or memory use of a Script Include running in a SOAP context?

Any guidance would be appreciated. Thanks!

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Carlos Petrucio 

try to process in chunks.

Since you said every 1 second you receive request and every request contains approx 300 rows, it's huge

May be chunk of 50

Also try to see if you can have this async

1) send the complete XML to script action and let script action handle the insert/update operation

With this script action runs asynchronously so possibly your issue might get solved, I haven't tested though.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Carlos Petrucio 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader