Skip to main content
Answer

REST API: finding long running tasks and killing them

  • August 20, 2025
  • 6 replies
  • 129 views

Forum|alt.badge.img+2

Yesterday, we had severe performance issues due to multiple running processes on a single user (import orders) that didn’t stop until we manually killed the processes:

Here’s the task that I want to implement on processes that have run longer than a minute or two:

Is there anything I can call in the RESTAPI to achieve this?

 

Thanks,

Brian

Best answer by tahayabali

@bpgraves I think the real fix is adding request timeouts around that external call.

6 replies

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • August 20, 2025

@bpgraves I don’t think REST API is designed for things like that. 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • September 25, 2025

Hi ​@bpgraves were you able to find a solution? Thank you!


Forum|alt.badge.img+2
  • Author
  • Semi-Pro I
  • September 30, 2025

Hi ​@bpgraves were you able to find a solution? Thank you!

Chris, no I haven’t and this problem is happening more frequently (multiple times each day).  Is there a way to query the System Monitor long running process using the RESTAPI to see if there is one so I can prevent using it creating orders?


Forum|alt.badge.img+3
  • Captain I
  • October 17, 2025

Hi ​@bpgraves.

Do you want to terminate these processes? As far as I know, there isn’t an API available for this. I’m not very familiar with this specific functionality, but as a developer, I can write code to either stop these processes or introduce a delay between them. You can write a python script to achieve this easily.


Forum|alt.badge.img+2
  • Author
  • Semi-Pro I
  • October 24, 2025

As a workaround, I’ve had to restart the node that the REST API is using to login.  This is the only way to get rid of all the long running processes.  However, the only real solution to resolving this is to find out what extra processes are running behind the REST API calls and limit those so that they don’t cause the RESTAPI call to wait before getting a response. 

In this case, it was a 3rd party API call that was failing but not ending the thread it was called on (causing the RESTAPI call to wait an infinite amount of time for it to finish).  We still haven’t been able to figure out why this started happening when we switched from having the Acumatica database in a cloud environment to having it on our local server.


Forum|alt.badge.img+3
  • Captain I
  • Answer
  • October 24, 2025

@bpgraves I think the real fix is adding request timeouts around that external call.