79126474

Date: 2024-10-25 16:12:29
Score: 1
Natty:
Report link

This is how it was handled

  1. the main program spans a separate process with its own specific timeout parameter. The org.apache.commons.exec.ExecuteWatchDog attempts to kill the separate process after its timeout is over
  2. main program dies or the child process does not terminate.
  3. Run a separate task periodically which kind of uses some shared data (in my case mongodb) with the main program and tracks if there are dangling processes. If there are then it kills such processes. If it cannot kill the dangling process, it sends an alert after a threshold count is breached and at that time we manually check the issue.
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Raman