Soak: a reconnect once stalled over 30 s at 'Återansluter…' #109

Closed
opened 2026-10-18 11:41:59 +00:00 by littlefox · 1 comment
Owner

Seen once in a local full e2e run on the #97 branch (desktop, soak.spec.ts), passed on retry and in 3 solo reruns. After a deliberate drop, the reader stayed at 'Anslutningen bröts. Återansluter…' (with 'Försök nu' / 'Logga in igen') for more than 30 s; the relay log shows only clean client closes. Possibly a failed first attempt pushing the backoff to 15–30 s (DELAYS = [1,2,4,8,15,30]) under load. To look at: log each reconnect attempt and its error in the events list, and see whether a failed attempt during a busy moment (e.g. the background recount from #96) explains it.

Seen once in a local full e2e run on the #97 branch (desktop, soak.spec.ts), passed on retry and in 3 solo reruns. After a deliberate drop, the reader stayed at 'Anslutningen bröts. Återansluter…' (with 'Försök nu' / 'Logga in igen') for more than 30 s; the relay log shows only clean client closes. Possibly a failed first attempt pushing the backoff to 15–30 s (DELAYS = [1,2,4,8,15,30]) under load. To look at: log each reconnect attempt and its error in the events list, and see whether a failed attempt during a busy moment (e.g. the background recount from #96) explains it.
Author
Owner

Merged in #145. The stall itself never reproduced, but three things in the reconnect path could cause it or hide it, and all three are fixed:

  • Once connected, an attempt had no time limit for logging in and starting. A connection that stopped answering there waited forever. It now gets 20 s.
  • A failed attempt left its connection open, and those piled up against the relay's per-address limit (8). Failed attempts now close it.
  • Failures weren't recorded. Each one is now in the events list ('Återanslutningen misslyckades: …'), so the next stall can be read off the screen.

Verified: a new reconnect.spec test where the first attempt gets the greeting and then hangs (given up after 20 s, socket closed, reason shown, the next attempt gets through), soak.spec with 16 drops in 60 s, and CI green. Closing; reopen if it shows up again with the events list in view.

Merged in #145. The stall itself never reproduced, but three things in the reconnect path could cause it or hide it, and all three are fixed: - Once connected, an attempt had no time limit for logging in and starting. A connection that stopped answering there waited forever. It now gets 20 s. - A failed attempt left its connection open, and those piled up against the relay's per-address limit (8). Failed attempts now close it. - Failures weren't recorded. Each one is now in the events list ('Återanslutningen misslyckades: …'), so the next stall can be read off the screen. Verified: a new reconnect.spec test where the first attempt gets the greeting and then hangs (given up after 20 s, socket closed, reason shown, the next attempt gets through), soak.spec with 16 drops in 60 s, and CI green. Closing; reopen if it shows up again with the events list in view.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
littlefox/neokom#109
No description provided.