Timeouts

Limit how long a task can run for before it is automatically cancelled.

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.

Run Cancellation

In addition to timeouts, you can explicitly cancel an active run to stop it from completing:

Timeout / Cancellation Behavior

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.

An example run that has been cancelled.

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.

Configuration

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: