Workers stop listening to the queue intermittently

We have observed that sometimes the workers go missing from the queue. Because of which when we try to run the query methods in the UI, we get ‘No Active workers in the queue’ error.

Questions:

  1. Do workers sleep after say 2 hours of no tasks in the task queue? Could that be causing the problem
    or
  2. If the workers stops listening to the queue, could it be a networking issue between worker and temporal server?
1 Like

Worker polls can time out if there are no tasks on the task queue they are polling for an amount of time(default 60s).
WorkflowServiceStubsOptions->DEFAULT_GRPC_RECONNECT_FREQUENCY has a default value of 1 minute so your polls should reconnect after that time.
I would look at possible issues with this reconnect on your side. Anything in the logs?