Set timeout for scheduled import set

sieusaopolo15
Giga Sage

Recently, there is a few scheduled import sets of mine which are stuck at 'Loading' state for days. I can't trace any error which leads to this matter so that I want to ask if there is any property like 'timeout' for my data sources ? When the job currently is not changed it's state from 'Loading' to any kind of state that job within 1 hour, it will be terminated to proceed the next job at the specific time.

1 ACCEPTED SOLUTION

Take a look at Transaction Quotas in ServiceNow. You can create something here to provide a transaction limit for various types of transactions.

 

Additionally, take a look at this ServiceNow Support article as it might solve your issue, or help you understand it further.

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0996698

View solution in original post

4 REPLIES 4

Ethan Davies
Mega Sage
Mega Sage

@sieusaopolo15 is your import via an Integration or a spreadsheet upload?

My imports are using FTP server method to retrieve the file

Take a look at Transaction Quotas in ServiceNow. You can create something here to provide a transaction limit for various types of transactions.

 

Additionally, take a look at this ServiceNow Support article as it might solve your issue, or help you understand it further.

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0996698

Community Alums
Not applicable

Hi @sieusaopolo15 

 

There is no built-in timeout property for data sources in ServiceNow. However, you can implement a custom solution to terminate scheduled import sets that remain in the 'Loading' state for an extended period. Here's one approach:

  1. Create a scheduled job that runs periodically, such as every hour.

  2. Within the scheduled job, query for scheduled import sets that are in the 'Loading' state and have been running for longer than the desired timeout period (e.g., one hour).

  3. For each of the identified scheduled import sets, terminate the job using the GlideRecord.cancel() method.

  4. Consider logging or sending notifications to notify relevant personnel when scheduled import sets are terminated due to timeouts.

Remember to implement proper error handling and logging to ensure the scheduled job functions as intended.

 

Note: While implementing a custom solution to terminate scheduled import sets in the 'Loading' state can address the issue, it's not considered a best practice. It introduces additional complexity and may not be a scalable solution for handling a large number of scheduled imports. It's generally recommended to investigate the underlying cause of the import sets getting stuck in the 'Loading' state and address the root cause rather than relying on a workaround.

 
If you found this helpful, a 'like' is the secret handshake of appreciation!
Prasad