You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Connect: threads slow to open, frequent "bb connect hit a temporary problem" #6450
Open the remote URL in a browser and click between threads during normal use.
Threads take several seconds to open; intermittently the "temporary problem" error appears and you have to retry.
Expected vs actual
Expected: threads open quickly and reliably over Connect.
Actual: slow thread loads, and frequent "bb connect hit a temporary problem. Try again in a moment".
Evidence
No matching entries in ~/.bb/logs on the host, so the failure seems to be on the relay side, not the local daemon.
Finding: controlled gate failures reproduce the generic HTTP 502 response. The production trigger and recurring thread-loading delays remain unverified; the message alone does not establish relay overload.
Verification: two clean trusted-main checkouts each pass all 298 Connect tests and 30 focused checks. The report includes the repeatable test command and evidence.
No PR: no spontaneous production regression was reproduced, so a safe failing-before/passing-after fix cannot yet be established. Next step: correlate a failing request with stored gate logs and tunnel metrics.
Another affected server, with timestamps and ray IDs you can match against gate logs. The origin and the tunnel were healthy throughout. Every failure and every slow response I measured happened in the gate, before the request reached the tunnel.
Setup:salem.getbb.app, bb 0.47.2-nightly.40565112260.1, Linux dedicated server, Cloudflare colo FRA (ICMP 5.5 ms, TCP connect 6 ms, TLS done at about 20 ms).
1. Outage window: 2026-10-28 ≈16:44–16:46 UTC, gate returned 502 while our tunnel was connected
Time (UTC)
Request
Result
≈16:44:00–16:44:45
GET / without a cookie (gate sign-in page, no tunnel)
401 after 0.34, 1.31, 1.83, 0.39, 2.79, 2.85, 2.10, 2.80, 3.07 s
16:44:53
GET /
502 connect_gate_error, ray a51b6861fbc21976-FRA
≈16:45:00–16:45:10
GET / ×15
502 connect_gate_error ×15 (50–230 ms)
≈16:46–16:47
GET /__tunnel without a credential (fresh resolveLabel, then the hash check, no tunnel)
401 "invalid credential" after 1.59 s
≈16:46–16:47
GET a shared-port host on this account (<machine>--<port>.getbb.app) without a cookie
401 after 3.23 s
At the same moment:
the origin answered 127.0.0.1 in 0.3–1.4 ms;
bb connect status said connected;
the connect plugin logged no tunnel closed from 15:37:54Z through 17:06Z.
In apps/connect/src/worker.ts, a cookieless GET / goes resolveLabel → signInPage, and /__tunnel without a credential goes resolveLabel({fresh: true}) → hash mismatch → 401. Neither path touches TunnelDO. The 502 is the catch-all in fetch(). So during this window something on the routing path (most likely D1 via resolveLabel) was slow or throwing. It was not the tunnel or the origin.
Observability gap: that catch path only does console.error (about 1% retained in Workers Logs) and writes nothing to bb_connect_gate_events. Gate 502s, and routing that takes 1–3 s but stays under the 30 s stall deadline, are therefore invisible in the dataset the debugging doc points to. That may explain the "production trigger … remain unverified" result in the triage above.
2. Baseline cost of the gate lookup, measured after recovery (16:49–17:06 UTC)
17-minute probe from the server host, every 10 s, 90 samples per URL. Gate time is TTFB minus TLS. All samples had a ray; there were no errors in this window.
A second vantage point through MRS shows the same gap: the unknown handle takes 0.51 s p50 after TLS, against 0.16 s for getbb.app/.
The unknown-handle 404 and the no-credential /__tunnel both do one uncached D1 lookup and nothing else. They cost about 0.2–0.6 s more than getbb.app/. The label cache lives 15 s and the session cache 20 s, and both are per isolate. So a phone that opens a thread after a short pause probably pays two D1 round trips (label + session) before its request reaches the tunnel: about 0.5 s on a good day, several seconds or a 502 on a bad one. That matches "threads slow to open". (Inference from the code and these timings; I can't see your D1 metrics.)
3. The tunnel dial path shows the same slowness (connect plugin log, 2026-10-18 → 10-28, 120 reconnects)
TLS to Cloudflare completes at 58 ms p50 / 158 ms p90.
The gate's 101 (upgradeMs) takes 766 ms p50 / 6.0 s p90 / 8.4 s max; 31 of 120 took longer than 3 s.
3 dials timed out after TLS while waiting on the gate (10-20 18:36Z, 10-23 16:46Z, 10-26 10:50Z).
4. Idle drops, same pattern as #5880 but not specific to ATL
120 tunnel closed (code 1006) in 10 days, 4–20 per day.
All of them had transportError: null.
111 of 120 closed while the last heartbeat ack was ≤20 s old, so the tunnel was alive when it dropped.
They are spread over 8 colos: FRA 65, TXL 36, CDG 6, VIE 5, DUS/BEG/MUC/AMS 2 each.
Nothing local lines up with today's drops: within ±60 s there are only unrelated provider-catalog refresh logs and a few sub-second DB queries. The connect plugin's own logs put origin TTFB for today's 1,158 proxied thread loads at p50 10.6 ms / p99 284 ms.
Today's drops (UTC): closed ray → new ray
closed
lived
hb ack age
open WS
colo
closed ray
gap
upgrade
new ray
02:37:55
286 min
2.9 s
4
FRA
a514ec0828fedc96-FRA
1.7 s
992 ms
a5168fb82c418f1a-FRA
03:06:11
28 min
14.7 s
4
FRA
a5168fb82c418f1a-FRA
1.2 s
396 ms
a516b9245dd21db8-FRA
04:20:04
73 min
11.1 s
4
FRA
a516b9245dd21db8-FRA
1.3 s
432 ms
a517255b59fe68a5-FRA
05:14:43
9 min
16.1 s
7
FRA
a51767cd19864dc0-FRA
1.2 s
287 ms
a517756c6a46b580-FRA
08:26:40
191 min
15.5 s
8
FRA
a517756c6a46b580-FRA
8.2 s
7355 ms
a5188e99bb39de45-FRA
13:30:43
303 min
13.4 s
4
FRA
a5188e99bb39de45-FRA
1.8 s
766 ms
a51a4bfc5e3df4c9-FRA
13:42:47
12 min
2.4 s
4
FRA
a51a4bfc5e3df4c9-FRA
7.1 s
6140 ms
a51a5da98f5474d4-FRA
14:51:38
68 min
3.5 s
7
FRA
a51a5da98f5474d4-FRA
1.7 s
1162 ms
a51ac281b8c2f4e5-FRA
14:52:03
0 min
3.4 s
7
FRA
a51ac281b8c2f4e5-FRA
5.8 s
5059 ms
a51ac31f7fd2d27c-FRA
15:37:54
45 min
5.1 s
7
FRA
a51ac31f7fd2d27c-FRA
1.6 s
757 ms
a51b064a6834dbdf-FRA
Suggested queries on your side
Workers Logs for bb connect: request failed around 2026-10-28 16:43–16:48 UTC, ray a51b6861fbc21976-FRA, plus D1 metrics for the connect DB in that window.
bb_connect_gate_events WHERE blob4 = 'salem.getbb.app' for slow and tunnel-gap events since 10-18.
I can rerun the probe, or capture rays for a future spike on request.
the periodic drops and instability is something we're addressing by moving off of cloudflare (we have an experiment ongoing right now that hopefully will resolve this in the medium term)
the outages today is specifically a scaling issue with usage, that should hopefully be mitigated by the server side fix (I'm seeing error rates dropping already)
Activity
bb-slop-cop commentedon Oct 28, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotremote,connect, andperf; no existing classifications were replaced.partial-repro.fabianlindfors commentedon Oct 28, 2026
Same for me. Seems to have been particularly bad today. I develop almost exclusively against a remote server and this breaks the app entirely.
salemsayed commentedon Oct 28, 2026
Another affected server, with timestamps and ray IDs you can match against gate logs. The origin and the tunnel were healthy throughout. Every failure and every slow response I measured happened in the gate, before the request reached the tunnel.
Setup:
salem.getbb.app, bb0.47.2-nightly.40565112260.1, Linux dedicated server, Cloudflare colo FRA (ICMP 5.5 ms, TCP connect 6 ms, TLS done at about 20 ms).1. Outage window: 2026-10-28 ≈16:44–16:46 UTC, gate returned 502 while our tunnel was connected
GET /without a cookie (gate sign-in page, no tunnel)GET /connect_gate_error, raya51b6861fbc21976-FRAGET /×15connect_gate_error×15 (50–230 ms)GET /__tunnelwithout a credential (freshresolveLabel, then the hash check, no tunnel)GETa shared-port host on this account (<machine>--<port>.getbb.app) without a cookieAt the same moment:
127.0.0.1in 0.3–1.4 ms;bb connect statussaidconnected;tunnel closedfrom 15:37:54Z through 17:06Z.In
apps/connect/src/worker.ts, a cookielessGET /goesresolveLabel→signInPage, and/__tunnelwithout a credential goesresolveLabel({fresh: true})→ hash mismatch → 401. Neither path touchesTunnelDO. The 502 is the catch-all infetch(). So during this window something on the routing path (most likely D1 viaresolveLabel) was slow or throwing. It was not the tunnel or the origin.Observability gap: that catch path only does
console.error(about 1% retained in Workers Logs) and writes nothing tobb_connect_gate_events. Gate 502s, and routing that takes 1–3 s but stays under the 30 s stall deadline, are therefore invisible in the dataset the debugging doc points to. That may explain the "production trigger … remain unverified" result in the triage above.2. Baseline cost of the gate lookup, measured after recovery (16:49–17:06 UTC)
17-minute probe from the server host, every 10 s, 90 samples per URL. Gate time is TTFB minus TLS. All samples had a ray; there were no errors in this window.
https://getbb.app/https://salem.getbb.app/resolveLabel(often cached) → sign-in page<machine>--<port>.getbb.app/(same account)https://zz-nohandle-probe.getbb.app/https://salem.getbb.app/__tunnel(20 samples)resolveLabel({fresh: true})→ 401A second vantage point through MRS shows the same gap: the unknown handle takes 0.51 s p50 after TLS, against 0.16 s for
getbb.app/.The unknown-handle 404 and the no-credential
/__tunnelboth do one uncached D1 lookup and nothing else. They cost about 0.2–0.6 s more thangetbb.app/. The label cache lives 15 s and the session cache 20 s, and both are per isolate. So a phone that opens a thread after a short pause probably pays two D1 round trips (label + session) before its request reaches the tunnel: about 0.5 s on a good day, several seconds or a 502 on a bad one. That matches "threads slow to open". (Inference from the code and these timings; I can't see your D1 metrics.)3. The tunnel dial path shows the same slowness (connect plugin log, 2026-10-18 → 10-28, 120 reconnects)
upgradeMs) takes 766 ms p50 / 6.0 s p90 / 8.4 s max; 31 of 120 took longer than 3 s.Today's slow upgrades: 08:26:40Z (7.4 s), 13:42:47Z (6.1 s), 14:52:03Z (5.1 s).
4. Idle drops, same pattern as #5880 but not specific to ATL
tunnel closed (code 1006)in 10 days, 4–20 per day.transportError: null.Today's drops (UTC): closed ray → new ray
a514ec0828fedc96-FRAa5168fb82c418f1a-FRAa5168fb82c418f1a-FRAa516b9245dd21db8-FRAa516b9245dd21db8-FRAa517255b59fe68a5-FRAa51767cd19864dc0-FRAa517756c6a46b580-FRAa517756c6a46b580-FRAa5188e99bb39de45-FRAa5188e99bb39de45-FRAa51a4bfc5e3df4c9-FRAa51a4bfc5e3df4c9-FRAa51a5da98f5474d4-FRAa51a5da98f5474d4-FRAa51ac281b8c2f4e5-FRAa51ac281b8c2f4e5-FRAa51ac31f7fd2d27c-FRAa51ac31f7fd2d27c-FRAa51b064a6834dbdf-FRASuggested queries on your side
bb connect: request failedaround 2026-10-28 16:43–16:48 UTC, raya51b6861fbc21976-FRA, plus D1 metrics for the connect DB in that window.bb_connect_gate_events WHERE blob4 = 'salem.getbb.app'forslowandtunnel-gapevents since 10-18.I can rerun the probe, or capture rays for a future spike on request.
Fix the connect sidebar refetch livelock and keep the gate routing th…
ymichael commentedon Oct 28, 2026
Thanks for the report! deployed a server side fix for this that should help mitigate things. will continue to monitor
ymichael commentedon Oct 28, 2026
A bit more information: