Skip to content

Debug market-data process crashes - #20

Merged
SamoraDC merged 1 commit into
mainfrom
claude/debug-market-data-crashes-r4Ir4
Dec 19, 2025
Merged

Debug market-data process crashes#20
SamoraDC merged 1 commit into
mainfrom
claude/debug-market-data-crashes-r4Ir4

Conversation

@SamoraDC

Copy link
Copy Markdown
Owner

Root cause: WebSocket manager was exiting with MaxReconnectAttemptsExceeded after 10 failed reconnection attempts (~3-4 min), causing supervisor to restart.

Changes:

  • Remove hard limit on reconnection attempts, service now runs indefinitely
  • Add cooldown period (5 min) to reset backoff counter after stable connection
  • Cap exponential backoff at 60 seconds max delay
  • Add keepalive ping mechanism with 30s timeout to detect stale connections
  • Add recv timeout (45s) to proactively detect and handle connection issues
  • Track last successful connection time for smarter backoff reset

This ensures the market-data service stays running even during extended network instability or Binance API issues.

Root cause: WebSocket manager was exiting with MaxReconnectAttemptsExceeded
after 10 failed reconnection attempts (~3-4 min), causing supervisor to restart.

Changes:
- Remove hard limit on reconnection attempts, service now runs indefinitely
- Add cooldown period (5 min) to reset backoff counter after stable connection
- Cap exponential backoff at 60 seconds max delay
- Add keepalive ping mechanism with 30s timeout to detect stale connections
- Add recv timeout (45s) to proactively detect and handle connection issues
- Track last successful connection time for smarter backoff reset

This ensures the market-data service stays running even during extended
network instability or Binance API issues.
@SamoraDC
SamoraDC merged commit 48a3edd into main Dec 19, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants