Files
patchmon.net/backend/src/routes
Muhammad Ibrahim 4b6f19c28e fix: Replace SSE with polling for WebSocket status to prevent connection pool exhaustion
- Replace persistent SSE connections with lightweight polling (10s interval)
- Optimize WebSocket status fetching using bulk endpoint instead of N individual calls
- Fix N+1 query problem in /dashboard/hosts endpoint (39 queries → 4 queries)
- Increase database connection pool limit from 5 to 50 via environment variables
- Increase Axios timeout from 10s to 30s for complex operations
- Fix malformed WebSocket routes causing 404 on bulk status endpoint

Fixes timeout issues when adding hosts with multiple WebSocket agents connected.
Reduces database connections from 19 persistent SSE + retries to 1 poll every 10 seconds.
2025-10-28 16:06:36 +00:00
..
2025-10-19 17:53:10 +01:00
2025-10-19 17:53:10 +01:00
2025-10-19 17:53:10 +01:00
2025-10-19 17:53:10 +01:00
2025-10-19 17:53:10 +01:00
2025-10-19 17:53:10 +01:00
2025-10-19 17:53:10 +01:00
2025-10-19 17:53:10 +01:00
2025-10-19 17:53:10 +01:00