Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Job stuck after receiving the SIGTERM and not killed within the max run time #846

Open
jasonlkh-wa opened this issue Jan 23, 2025 · 1 comment

Comments

@jasonlkh-wa
Copy link

[2025/01/23 12:35:01] <stdout of my job>
Caught SIGTERM, killing child: 75973

# Job failed at 2025/01/23 12:44:43 (GMT+0).
# Error: Job Aborted: Exceeded maximum run time (1 minute)
# End of log.

There are 3 things confusing me in this log,

  1. the process id is 75972 in the cronicle UI, but it's sending a SIGTERM to 75973
  2. after getting a SIGTERM, the job stucks there
  3. it does not get killed within 1 mins which is the maximum run time I configured, but only after 10mins.

Note that I could not consistently replicate the issue since the job works fine 98% of the time. So it's a bit random when it happens and it also consumes 39.9% of CPU while on average this job consumes 0%.

@jhuckaby
Copy link
Owner

Well, I think I can answer your first question at least. When using the Shell Plugin, which I assume you are doing, there is a second process in play. Cronicle spawns a Shell Plugin controller process first (that's the PID shown in the UI), and then the plugin launches your process from there. When a job is aborted, the Shell Plugin sends a SIGTERM to the next child process, so that's why you're seeing that second PID in the log.

I cannot explain your other issues here, as I don't know anything about your setup, server hardware / software, or versions of anything. If a process doesn't respond to a term signal, Cronicle should only wait for the child_kill_timeout before sending a SIGKILL. This timeout defaults to 10 seconds.

Your third item makes no sense to me at all.

I'm sorry I could not be of much help. This is a very confusing problem, and not one I have ever encountered before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants