Title: Worker stops permanently after peer resets `GetWorkItems` stream · Issue #175 · microsoft/durabletask-python · GitHub
Open Graph Title: Worker stops permanently after peer resets `GetWorkItems` stream · Issue #175 · microsoft/durabletask-python
X Title: Worker stops permanently after peer resets `GetWorkItems` stream · Issue #175 · microsoft/durabletask-python
Description: What happened DurableTaskSchedulerWorker permanently stopped receiving work after DTS reset the GetWorkItems stream: status = StatusCode.CANCELLED details = "Received RST_STREAM with error code 8" Disconnected from ... No longer listenin...
Open Graph Description: What happened DurableTaskSchedulerWorker permanently stopped receiving work after DTS reset the GetWorkItems stream: status = StatusCode.CANCELLED details = "Received RST_STREAM with error code 8" ...
X Description: What happened DurableTaskSchedulerWorker permanently stopped receiving work after DTS reset the GetWorkItems stream: status = StatusCode.CANCELLED details = "Received RST_STREAM with error cod...
Opengraph URL: https://github.com/microsoft/durabletask-python/issues/175
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Worker stops permanently after peer resets `GetWorkItems` stream","articleBody":"### What happened\n\n`DurableTaskSchedulerWorker` permanently stopped receiving work after DTS reset the `GetWorkItems` stream:\n\n```text\nstatus = StatusCode.CANCELLED\ndetails = \"Received RST_STREAM with error code 8\"\nDisconnected from ...\nNo longer listening for work items\n```\n\nThe process and container remained healthy, but the scheduler's `ConnectedWorkers` metric dropped from 1 to 0 until the container was restarted. I observed this twice, after connections lasting roughly 10.5 and 13.7 hours.\n\nThere was no container restart, resource pressure, deployment, or Azure service-health event at either disconnect.\n\n### Cause\n\nIn `TaskHubGrpcWorker._async_run_loop`, `CANCELLED` always exits the worker loop:\n\n```python\nif error_code == grpc.StatusCode.CANCELLED:\n self._logger.info(f\"Disconnected from {self._host_address}\")\n break\n```\n\nThis also happens for peer-initiated cancellation, not only `worker.stop()`. The connection is invalidated, but the common reconnect path is skipped.\n\nThe current tests use `CANCELLED` as a convenient way to stop the worker loop, so this case is not covered.\n\n### Expected behavior\n\nA peer-initiated `CANCELLED` should reconnect. The worker should exit only when shutdown was requested.\n\nFor example:\n\n```python\nif error_code == grpc.StatusCode.CANCELLED and self._shutdown.is_set():\n self._logger.info(f\"Disconnected from {self._host_address}\")\n break\n```\n\nOtherwise, `CANCELLED` can continue through the existing connection-reset and retry path.\n\n### Environment\n\n- `durabletask==1.7.2`\n- `durabletask-azuremanaged==1.7.2`\n- Python 3.12\n","author":{"url":"https://github.com/torosent","@type":"Person","name":"torosent"},"datePublished":"2026-07-17T14:58:36Z","url":"https://github.com/microsoft/durabletask-python/issues/175"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:29599c08-92bc-1c79-2c3c-ff7bff3c8f9e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A2A0:1C0763:1AE68B:22D46C:6AFE58A8 |
| html-safe-nonce | 453c307ce2d0e4eb285c7ae739818a1d76b4ac6576e07d18b07fb451ab979bfa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkEwOjFDMDc2MzoxQUU2OEI6MjJENDZDOjZBRkU1OEE4IiwidmlzaXRvcl9pZCI6IjIwMjU1NTYzNTcyNTk2MTQzNzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 686ee78f93bf616765ed7bc8e4fa72770784163e550499c9bc35c51747fd8005 |
| hovercard-subject-tag | issue:4912439840 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/durabletask-python/175/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4b307b045a2acc365ac27816eaa3288f276c834edd8ea5dcef4d586b7803a70a/microsoft/durabletask-python/issues/175 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4b307b045a2acc365ac27816eaa3288f276c834edd8ea5dcef4d586b7803a70a/microsoft/durabletask-python/issues/175 |
| og:image:alt | What happened DurableTaskSchedulerWorker permanently stopped receiving work after DTS reset the GetWorkItems stream: status = StatusCode.CANCELLED details = "Received RST_STREAM with error code 8" ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | torosent |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/durabletask-python git https://github.com/microsoft/durabletask-python.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 627664515 |
| octolytics-dimension-repository_nwo | microsoft/durabletask-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627664515 |
| octolytics-dimension-repository_network_root_nwo | microsoft/durabletask-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width