# Workers not polling for tasks

**URL:** <https://community.temporal.io/t/workers-not-polling-for-tasks/16411>\
**Category:** Community Support\
**Tags:** go-sdk\
**Created:** [February 6, 2025, 7:28am UTC](https://community.temporal.io/t/workers-not-polling-for-tasks/16411 "2025-02-06T07:28:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shantanu\_Sharma](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/shantanu_sharma/32/5719_2.png) [@Shantanu\_Sharma](https://community.temporal.io/u/Shantanu_Sharma)\
**Post date:** [February 6, 2025, 7:28am UTC](https://community.temporal.io/t/workers-not-polling-for-tasks/16411/1 "2025-02-06T07:28:40Z")

</div>

We are using go sdk version v1.25.1.  
The number of task slots available keep reducing continously without increase in load, the number of pollers of task queue are also less than the number of pods running.

 ![Screenshot 2025-02-06 at 12.55.08 PM](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/6/6359ab10ef5836ecb9193b90ecfdcb5e2aa86835.png)  
When we restart the k8s deployment where workers are running, the slots become available.  
Is there a way to find why task pollers become unavailable, even when pods are in healthy condition. Is there a way to monitor this internally from the worker pod, and restart pod when it is not polling the task queue?

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [February 6, 2025, 3:03pm UTC](https://community.temporal.io/t/workers-not-polling-for-tasks/16411/2 "2025-02-06T15:03:20Z")

</div>

> Is there a way to find why task pollers become unavailable, even when pods are in healthy

your worker can only poll for tasks when it has capacity (available activity task slots). so if something in your activity code blocks (such as calls do downstream apis) and activity does not release task slot, they can get filled up and worker would stop polling for more activity tasks until at least one activity completes.

so once available task slots become 0 your worker would stop polling for activity tasks.

> Is there a way to monitor this internally

i think you should debug why your activity code is blocking, if you create connections to any downstreams/db would consider adding timeout on this connection that is less than the activity StartToClose timeout. if this connection then times out, fail the activity so it can retry

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [February 6, 2025, 3:06pm UTC](https://community.temporal.io/t/workers-not-polling-for-tasks/16411/3 "2025-02-06T15:06:04Z")

</div>

> Is there a way to monitor this internally

server metrics can help you view activity starttoclose timeouts on namespace level

`sum(rate(start_to_close_timeout{operation="TimerActiveTaskActivityTimeout"}[5m])) by(namespace,operation)`

you should also alert on `temporal_worker_task_slots_available` dropping to zero

---

<div class="post-metadata">

**Author:** ![Shantanu\_Sharma](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/shantanu_sharma/32/5719_2.png) [@Shantanu\_Sharma](https://community.temporal.io/u/Shantanu_Sharma)\
**Post date:** [February 7, 2025, 5:26am UTC](https://community.temporal.io/t/workers-not-polling-for-tasks/16411/4 "2025-02-07T05:26:56Z")

</div>

Thanks @tihomir it makes sense the internal db calls might block causing this. However in case when activity blocks, can it be marked as completed which we see on temporal dashboard.  
Basically we see fewer workflows in running state compared to total task slots consumed.

 ![Screenshot 2025-02-07 at 10.55.38 AM](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/5/593bca1071b2606785aaf6271ac5fa5fd6f29061.jpeg)

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [February 8, 2025, 4:31pm UTC](https://community.temporal.io/t/workers-not-polling-for-tasks/16411/5 "2025-02-08T16:31:27Z")

</div>

> However in case when activity blocks, can it be marked as completed which we see on temporal dashboard.

would depend on your activity retry policy. activity timeout would cause retry. can you share your activity options?

> Basically we see fewer workflows in running state compared to total task slots consumed.

if you are talking about your activity task slots as in initial question then i think there is no 1-1 relationship here. your activities that keep timing out and dont release task slots are being retried, causing more activity tasks to get stuf, and you are seeing executor slot numbers depleting

---

<div class="post-metadata">

**Author:** ![Shantanu\_Sharma](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/shantanu_sharma/32/5719_2.png) [@Shantanu\_Sharma](https://community.temporal.io/u/Shantanu_Sharma)\
**Post date:** [February 10, 2025, 5:20am UTC](https://community.temporal.io/t/workers-not-polling-for-tasks/16411/6 "2025-02-10T05:20:26Z")

</div>

The reason we found was - The activity being run here was a long running activity, and at a certain step due to race condition it was getting stuck because of a blocking fs call, since activity heartbeat timed out it got scheduled on other pod where it completed successfully but the original pod where the race condition happened never released task slot and overtime task slots kept reducing because this race condition was not very rare/happens frequently.

---

<div class="post-metadata">

**Author:** ![Carlos\_Tellechea](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/carlos_tellechea/32/7924_2.png) [@Carlos\_Tellechea](https://community.temporal.io/u/Carlos_Tellechea)\
**Post date:** [November 11, 2025, 7:15pm UTC](https://community.temporal.io/t/workers-not-polling-for-tasks/16411/7 "2025-11-11T19:15:09Z")

</div>

@Shantanu_Sharma @tihomir We are having the same behavior, Have you found the root cause of this issue, or how can we deal with that? We are using Temporal with python-sdk.  
Thanks in advance!
