VCS scanner: one slow connection can stall code-subscription scans for hours
Maintainers usually reply within 1 day
A pull request for this has already been merged.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go, google-cloud
- Domain
- backend, distributed-systems
Research direction
Start by finding the VCS scanner worker and archive download code, then trace how it handles HTTP connections, scan timeouts, concurrency, and Pub/Sub message acknowledgment. Implement the three stated limits: a short-lived connection per download, a 3-minute scan timeout, and at most 20 concurrent scans per worker. Done when tests cover these limits and the reported queue stalls are addressed.
Written by the indexing model from the issue text.
Description
Problem
The Pub/Sub High Latency (prod) alert fired 7 times between Nov 12 and Nov 18 on vcs-scan-tasks-sub-prod. Episodes lasted from 16 minutes to over 6 hours. During each one, repository scans on one worker were delayed by up to an hour, and some scan tasks were silently dropped once they passed the subscription's 1-hour retention.
Why it happens
- All downloads share one connection. Each scanner worker sends all of its archive downloads over a single shared HTTP/2 connection. Sometimes that connection is slow. New downloads keep arriving before the old ones finish, so the connection never goes idle and is never replaced. It slows every scan on that worker until something resets it.
- Nothing times out. A stuck download keeps its Pub/Sub message for up to an hour, so the queue backs up and the alert fires.
Fix
- Give each archive download its own short-lived connection.
- Time out scans after 3 minutes.
- Process at most 20 scans at once per worker.
Impact
- A slow connection affects one download, instead of every scan on a worker for hours.
- A stuck download is cut off after 3 minutes instead of holding its message for an hour.
- Dominant language
- Go
- Stars
- 264
- Forks
- 65
- Avg merge
- 22h 28m
- Merged PRs (30d)
- 75
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GoogleChrome/webstatus.dev
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
GoogleChrome/webstatus.dev#2815 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
GoogleChrome/webstatus.dev#2814 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
GoogleChrome/webstatus.dev#2671 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
GoogleChrome/webstatus.dev#2555 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
GoogleChrome/webstatus.dev#2554 ·
Maintainers usually reply within 1 day
All issues in GoogleChrome/webstatus.dev
Similar issues
-
[inputs.internal] README lists go_version tag on internal_gather instead of internal_agentPossibly taken @cvas22 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
influxdata/telegraf#20264 ·
Maintainers usually reply within 1 day
-
[Bug] Standalone migration breaks existing Ingress routes using the envoy-http Service port nameOpenaccepted bug wg/enterprise-environment
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/semantic-router#7483 · 1 comment ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
stacklok/toolhive-catalog#2076 ·
Maintainers usually reply within 1 day
-
vulncheck or vulndb
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gke-labs/kube-agents#7441 ·
Maintainers usually reply within 1 day