Title: lab-ops-hub: Worker-fallback crawler has no fetch timeout — a slow target hangs the crawl indefinitely · Issue #500 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: Worker-fallback crawler has no fetch timeout — a slow target hangs the crawl indefinitely · Issue #500 · developing-today/code
X Title: lab-ops-hub: Worker-fallback crawler has no fetch timeout — a slow target hangs the crawl indefinitely · Issue #500 · developing-today/code
Description: Problem The Lab Ops Hub Worker-fallback crawler has no fetch timeout, unlike both sibling paths: Container crawler: pkgs/lab-ops-hub/container/app.py:205 opens with an explicit timeout — _OPENER.open(req, timeout=20). Container dispatch ...
Open Graph Description: Problem The Lab Ops Hub Worker-fallback crawler has no fetch timeout, unlike both sibling paths: Container crawler: pkgs/lab-ops-hub/container/app.py:205 opens with an explicit timeout — _OPENER.op...
X Description: Problem The Lab Ops Hub Worker-fallback crawler has no fetch timeout, unlike both sibling paths: Container crawler: pkgs/lab-ops-hub/container/app.py:205 opens with an explicit timeout — _OPENER.op...
Opengraph URL: https://github.com/developing-today/code/issues/500
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: Worker-fallback crawler has no fetch timeout — a slow target hangs the crawl indefinitely","articleBody":"## Problem\n\nThe Lab Ops Hub Worker-fallback crawler has **no fetch timeout**, unlike both sibling paths:\n\n- Container crawler: `pkgs/lab-ops-hub/container/app.py:205` opens with an explicit timeout — `_OPENER.open(req, timeout=20)`.\n- Container dispatch from the Worker: `pkgs/lab-ops-hub/src/index.ts:146` — `signal: AbortSignal.timeout(120_000)` with a comment explaining it must never hang the request.\n- Worker fallback: `pkgs/lab-ops-hub/src/index.ts:164-166` —\n\n```ts\nconst res = await fetchFollowingValidatedRedirects(url, (u) =>\n fetch(u, { redirect: \"manual\", headers: { \"user-agent\": \"LabOpsHub/0.1 (+personal crawler)\" } }),\n);\n```\n\nNo `signal`, no deadline — neither per hop nor overall.\n\n## Why it matters\n\n`fetchFollowingValidatedRedirects` (`src/lib.ts:179`) awaits each hop's fetch, and `readResponseTextCapped` (`src/lib.ts:220`, #481) then awaits `reader.read()` until the body ends or the 2 MB cap is reached. The cap bounds **bytes**, not **time**: a validated public server that accepts the connection and then responds very slowly — or slow-drips a body at a few bytes per minute — keeps the crawl request (and the Worker invocation) hanging until platform limits kill it, instead of failing fast and returning an error the caller can surface. Every redirect hop multiplies the exposure. This is exactly the hang the container path's 120 s `AbortSignal.timeout` and the Python crawler's 20 s timeout were written to prevent; the fallback path — the one that runs when the container is already unavailable — was left unprotected.\n\n## Evidence\n\n- `pkgs/lab-ops-hub/src/index.ts:164-166` on main `472726dd`: the injected fetcher passes only `redirect` and `headers`; no `signal`.\n- `pkgs/lab-ops-hub/container/app.py:205`: `timeout=20`.\n- `pkgs/lab-ops-hub/src/index.ts:138-147`: container fetch carries `AbortSignal.timeout(120_000)`.\n- Dedup: no open or closed issue mentions a crawl/fetch timeout for the Worker fallback (searched `crawl timeout`, `lab-ops-hub`).\n\n## Suggested fix\n\nGive the fallback fetcher a per-hop timeout mirroring the container crawler, e.g. `signal: AbortSignal.timeout(20_000)` in the `fetch(...)` init in `crawlFallback` (per-hop matches urllib's per-operation timeout semantics; an overall deadline across hops is also acceptable if it is simpler to reason about). A timeout should surface as an ordinary crawl failure (the `/api/crawl` handler already records `containerError`/fallback errors), not an unhandled rejection.\n\n## Acceptance criteria\n\n- [ ] A crawl target that accepts the connection but never (or only very slowly) responds fails the fallback crawl within a bounded, documented time instead of hanging.\n- [ ] The timeout applies to every redirect hop, not just the first fetch.\n- [ ] The slow-drip body case is covered: the body read cannot wait indefinitely below the byte cap.\n- [ ] Normal fast crawls and the existing redirect-validation behaviour are unchanged (existing lab-ops-hub test suites still pass).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-21T20:02:34Z","url":"https://github.com/developing-today/code/issues/500"}
| 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:e934955d-7b9c-cb17-655c-33acdbcb2ba0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 82A0:259026:A55C89:D6FAFD:6B063954 |
| html-safe-nonce | 53a589aa4a7e90402577eba7309352e5dade79bcea14403c247daaa0d2fbbe2e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkEwOjI1OTAyNjpBNTVDODk6RDZGQUZEOjZCMDYzOTU0IiwidmlzaXRvcl9pZCI6IjI5OTc4MzQ4NDg4MTcwMDI4MzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 13fed7766f813632bc96568d0322ae643acb28795bdf2ad9a4cdca95a1c51b01 |
| hovercard-subject-tag | issue:5967632786 |
| 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/developing-today/code/500/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3663de276607eee350016a272854afea2cbe798ba58b623693d66e99044f5b81/developing-today/code/issues/500 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3663de276607eee350016a272854afea2cbe798ba58b623693d66e99044f5b81/developing-today/code/issues/500 |
| og:image:alt | Problem The Lab Ops Hub Worker-fallback crawler has no fetch timeout, unlike both sibling paths: Container crawler: pkgs/lab-ops-hub/container/app.py:205 opens with an explicit timeout — _OPENER.op... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | dcf72c457c022486d23c3cbb0dd21aba537a87611ca9ddabd1799cf2eaa9b297 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| 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 | 0f38f5735226749ec5e08a8649dce4cb2613d9ad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width