Task timeouts allow you to limit the amount of time that a task will run before it is automatically cancelled. This can be useful to prevent "run-away" tasks from consuming excessive resources.
By default, all tasks time out after 1 hour, but this can be extended up to 24 hours.
In addition to timeouts, you can explicitly cancel an active run to stop it from completing:
When a run times out or is canceled, it will be issued a SIGTERM and given 10 seconds to gracefully shut down. If the run has not yet exited after 10 seconds, then the run will be sent a SIGKILL.
Tasks can gracefully handle this by listening for SIGTERMs, performing any relevant cleanup, then exiting on their own.
Runs can also be cancelled before they are started, in which case the run is immediately cancelled without this behavior.
Timeouts are represented in seconds since a task was started. They can be configured in the Advanced section when editing a task:
When you execute a run, you'll be able to see that run's timeout in the right sidebar: