Workers Shutting Down Due to "Context timeout is not set." Error

I’m encountering an issue where Temporal workers suddenly shut down with the following error message:

json

{"level":"error","ts":"2025-02-28T11:32:23.876Z","msg":"Worker received non-retriable error. Shutting down.","Namespace":"temporal-system","TaskQueue":"temporal-sys-batcher-taskqueue","WorkerID":"199@cotbspapp3@","WorkerType":"WorkflowWorker","Error":"Context timeout is not set."}
{"level":"error","ts":"2025-02-28T11:32:23.890Z","msg":"Worker received non-retriable error. Shutting down.","Namespace":"temporal-system","TaskQueue":"temporal-sys-batcher-taskqueue","WorkerID":"199@cotbspapp3@","WorkerType":"ActivityWorker","Error":"Context timeout is not set."}

The issue happens across multiple workers (both WorkflowWorkers and ActivityWorkers) in different task queues, and the only way I could resolve it was by restarting the Temporal workflow service.

Some context:

  • The issue occurred suddenly, without any recent code changes.
  • The Temporal server and workers were running fine before this happened.

Has anyone encountered this issue before? What could be causing the "Context timeout is not set." error, and is there a better way to prevent or handle this without restarting the service?

Thanks in advance!