Error message while retrieving the all records from API

Munny1
Tera Expert

Hello @Ankur Bawiskar ,

 

can u help on this

 

How can i fix the below error?

 

"error":{"message":"Transaction cancelled: maximum execution time exceeded","detail":"maximum execution time exceeded Check logs for error trace or enable glide.rest.debug property to verify REST request processing"},"status":"failure"}

 

https://dev.service-now.com/api/now/table/sys_user?sysparm_display_value=true&sysparm_exclude_refere...

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Munny1 

check this link

Maximum execution time exceeded error while making an inbound REST call 

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

Rahul Kumar17
Tera Guru

Hi,

 

This error occurs when a REST API request takes longer to execute than the maximum allowed execution time. The maximum execution time is set in the instance property "glide.rest.max_execution_time_in_seconds" and defaults to 60 seconds.

To fix this error, you can try the following:

  1. Increase the value of the "glide.rest.max_execution_time_in_seconds" property to a higher value, such as 120 seconds, by going to System Properties > All Properties and searching for "glide.rest.max_execution_time_in_seconds".

  2. Optimize your API request to reduce the amount of time it takes to execute. This could include optimizing queries or reducing the amount of data being requested.

  3. Use asynchronous REST APIs instead of synchronous APIs, which will allow the request to complete in the background without blocking the current thread.

  4. If none of the above solutions work, you can try breaking up the API request into smaller requests or implementing pagination to reduce the amount of data being processed at one time.

thanks,

Rahul Kumar

If my response helped please mark it correct and close the thread.

Thanks,
Rahul Kumar