[Bug]: t3 code reconnecting issue #25203
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/desktop
Steps to reproduce#
just use the app and i keep getting this and its stuck saying reconnecting. this is really annoying on stable.
Expected behavior#
to not have this reconnecting bug that was introduced on the latest stable release.
Actual behavior#
stuck reconnecting
Impact#
Blocks work completely
Version or commit#
0.1.2
Environment#
windows
Logs or stack traces#
Screenshots, recordings, or supporting files#
No response
Workaround#
No response
TheDarkSkyXD(GitHub profile, opens in a new tab) added labelsbug
TheDarkSkyXD(GitHub profile, opens in a new tab) added labelsneeds-triage
juliusmarminge added labelsneeds more info
heres the report
juliusmarminge removed labelsneeds more info
Thanks, the bundle narrows it down. What it shows, read against
mainat e9236274a3:- 409 of the 715 recorded stalls lasted 5 s or more. 361 of those used under 20% CPU while the event loop counted as busy. The server was not computing; its main thread was waiting on I/O.
- The 6.8 s stall reported at 11:58:26 UTC matches a gap in the trace from 11:58:13.7 to 11:58:21.1 in which the server ran nothing. Two SQLite statements were in flight across that gap, started at 11:58:13.358 and 11:58:13.716 UTC, and both finished at 11:58:21.125. Your client's
server.reportClientActivityrequest went out at 11:58:14.77 and was answered at 11:58:21.15. SQLite writes run on the server's main thread, so one slow statement holds every request. The client shows that as "reconnecting". - One background job ran 327 SQLite statements back to back for the whole 130 s window, each between 100 ms and 7.8 s, median 340 ms.
The sanitized trace redacts the SQL text, so I can't tell which statements or which job these are. Please attach:
- The
db.query.textattribute of thesqlitespans over 1 s in that same window, at least the two that started at 11:58:13.358 and 11:58:13.716 UTC, plus a few from the long run. It holds the statement with?placeholders. The bound values are not in the trace. - The sizes of
statev2.sqliteandstatev2.sqlite-walinE:\AI-AppData\T3\userdata. - What kind of drive
E:is (internal SSD, HDD, USB, network share, Dev Drive), and whether your antivirus scans that folder.
juliusmarminge added labelsneeds more info
[Updated diagnostic ZIP t3-stall-diagnostics.zip includes the requested attachments.
- SQL: Exact attributes for 23 spans, including both named spans and additional compaction samples. Both named statements match
ProjectionMaintenance.compactEventStore. T3 itself truncated their SQL, so I also attached the full matching statement recovered from installed code, labeled separately. - Database:
statev2.sqlite— 12,502,220,800 bytes (12.50 GB). - WAL:
statev2.sqlite-wal— 9,208,232 bytes (9.21 MB). - E: drive: Internal SATA HDD, model ST2000DM008-2FR102, NTFS. Not a Dev Drive.
- Antivirus: Windows Defender real-time and on-access protection are enabled. Folder scanning remains unconfirmed: exclusions return “Must be an administrator to view exclusions.” No antivirus settings were changed.
- SQL: Exact attributes for 23 spans, including both named spans and additional compaction samples. Both named statements match
juliusmarminge removed labelsneeds more info
i manually have it excluded for the antivirus
i also feel the t3 code database it a bit large i wonder if we can add in something so it cleans itself on startup.
+1, I see this every day, and the slow reconnect is the main thing that hurts.
Setup: desktop client v0.1.5 on Linux (Omarchy/Hyprland) and the Android app, both connected to two self-hosted remote environments (Linux VPSes) over Tailscale.
What happens: whenever I open the laptop lid or come back to the phone, every session sits on "reconnecting" for a long time before the remote servers come back, even though the network is already up (SSH over the same tailnet works right away). #30118 looks like the same root cause on the T3 Connect side.
What would help:
- Reconnect the moment the OS reports the network/resume, instead of waiting out a backoff timer
- Show cached threads straight away while the socket reconnects in the background, so it never looks empty
Related, and honestly the biggest win for me: reliable mobile push notifications for sessions running on my remote servers (agent finished, approval needed, error), so I don't have to open the app and wait for the reconnect just to check on a session. Direct connections should get them without T3 Connect (#29726 was closed, but I'm not sure what changed).
This is the same problem as #30065, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.
juliusmarminge closed this
Sign in to join this conversation.
Thanks for the screenshots. They show the server inside the desktop app stopping answering:
SocketReadError, "did not answer", and "40 requests waiting longer than 15s". The client shows "reconnecting" whenever the server misses its pings for 15 s.What I ran, on
mainat 96fc7b9551 (web client, fresh database, Linux):So the client recovers as soon as the server answers again. In your case something keeps the server's event loop blocked. On Windows we already track two causes: #22586 (file-index rescans after runs in large repositories) and #25245 (slow
git.exestarts). Your logs will show which one this is, if either.Please attach:
%USERPROFILE%\.t3\userdata\logs\event-loop-stalls.ndjson, from a session where it got stuck. It lists each stall with its duration.%USERPROFILE%\.t3\userdata\logs\server.trace.ndjsonaround one stuck period, with the time it happened. Remove anything private first.