Common Issues
Startup Failures
Redis Connection Failed
Symptom:-
Start Redis:
-
Verify Redis is listening:
-
Check Redis URL in config:
-
Test connection:
Port Already in Use
Symptom:-
Find the process using the port:
-
Kill the conflicting process:
-
Or change the port in config:
Configuration Validation Failed
Symptom:- Empty Redis URL
- No backends defined
- Duplicate backend labels
- Backend weight ≤ 0
- Method route referencing non-existent backend
- Invalid timeout value (≤ 0)
Request Failures
Unauthorized (401)
Symptom:-
Verify API key exists:
-
Create a new API key:
-
Check key is active:
Rate Limited (429)
Symptom:-
Check current rate limit:
-
Increase rate limit:
-
Monitor rate limit metrics:
No Healthy Backends (503)
Symptom:-
Check backend health status:
-
Check health metrics:
-
Review health check logs:
-
Common health check failures:
- Backend is down
- Backend is too slow (timeout)
- Backend is lagging (slot lag)
- Network connectivity issues
Gateway Timeout (504)
Symptom:proxy.timeout_secs to respond
Solutions:
-
Increase proxy timeout:
-
Reload configuration:
-
Check backend performance:
-
Monitor backend latency:
Backend Health Issues
Backend Marked Unhealthy
Log output:-
Check last error:
-
Test backend directly:
-
Check health check configuration:
-
Common failure reasons:
Timeout:
Solution: Increase
timeout_secsor investigate backend slowness Non-200 status:Solution: Backend is down or overloaded Slot lag:Solution: Backend is syncing, increasemax_slot_lagor wait for sync
Frequent Health State Flapping
Symptom:-
Increase thresholds to reduce flapping:
-
Increase health check interval:
-
Investigate backend stability:
- Check backend logs
- Monitor backend resource usage
- Test network connectivity
WebSocket Issues
WebSocket Connection Failed
Log output:-
Verify backend WebSocket URL:
-
Test WebSocket endpoint directly:
-
Check WebSocket metrics:
No WebSocket Backends Available
Symptom:ws_url configured or all WS backends are unhealthy
Solutions:
-
Add WebSocket URLs to backends:
-
Check which backends support WebSocket:
-
Reload configuration:
Configuration Reload Issues
Reload Not Taking Effect
Symptom: Sent SIGHUP but configuration unchanged Diagnostic steps:-
Check logs for reload attempt:
Expected:
-
Verify signal reached process:
-
Check for validation errors:
-
Verify config file permissions:
Configuration Validation Failed on Reload
Log output:- Review error message
- Fix configuration
- Send SIGHUP again
Debugging Tools
Log Analysis
Enable Debug Logging
error: Critical failureswarn: Non-critical issues (health check failures, rate limits)info: Normal operations (requests, reloads)debug: Detailed diagnostics
Filter Logs by Component
Structured Log Parsing
Logs use structured format. Example log line:Health Check Diagnostics
Manual Health Check Test
Simulate the router’s health check:Check Backend Slot Lag
Metrics-Based Debugging
Check Current Backend Health
Identify High-Error Backends
Identify Slow Backends
Network Diagnostics
Test Backend Connectivity
Check Network Latency
Performance Issues
High Memory Usage
Diagnostic:- Too many active WebSocket connections
- Large request/response bodies
- Memory leak (report as bug)
-
Check active WebSocket connections:
-
Monitor connection duration:
-
Restart if memory leak suspected:
High CPU Usage
Diagnostic:- High request volume
- Expensive regex in logs
- Too frequent health checks
-
Check request rate:
-
Reduce health check frequency:
- Consider horizontal scaling
Getting Help
If you’ve tried the above steps and still have issues:-
Collect diagnostic information:
- Check existing issues: Search the GitHub issue tracker
- Report the bug: Include diagnostic info and steps to reproduce