You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Question: How to set process_alive_threshold or a global job timeout on a worker queue type? #346
Can I set the process_alive_threshold per worker queue, e.g. all are default, but this long_running_task's threshold is at 10 minutes? (I do not necesserily want to set it to a higher threshold globally since most of my jobs run in under 30 seconds)
Can I configure a global timeout for a job, e.g. tasks that have been running for longer than 30 minutes automatically get shut down with a failure?
Hey @kirkath! The process_alive_threshold can only be set globally at the moment, but this threshold is not used to kill workers automatically. This is used by the supervisor to delete process records from the database if a process fails to send the heartbeat for more time than that interval, as described here. It doesn't matter how long jobs take to run, the heartbeat is sent in a separate thread.
Can I configure a global timeout for a job, e.g. tasks that have been running for longer than 30 minutes automatically get shut down with a failure?
Unfortunately, we don't have any feature like this yet. You'd have to do something external to Solid Queue. I'll consider it, in any case.
Activity
rosa commentedon Sep 13, 2024
Hey @kirkath! The
process_alive_thresholdcan only be set globally at the moment, but this threshold is not used to kill workers automatically. This is used by the supervisor to delete process records from the database if a process fails to send the heartbeat for more time than that interval, as described here. It doesn't matter how long jobs take to run, the heartbeat is sent in a separate thread.Unfortunately, we don't have any feature like this yet. You'd have to do something external to Solid Queue. I'll consider it, in any case.
kirkath commentedon Sep 13, 2024
Thank you for the quick response. I shall figure something out in the meanwhile. Closing.