Add debug logging and optimize SQLite performance

- Add debug logging for goroutines and memory usage (enabled via DEBUG=routewatch)
- Increase SQLite connection pool from 1 to 10 connections for better concurrency
- Optimize SQLite pragmas for balanced performance and safety
- Add proper shutdown handling for peering handler
- Define constants to avoid magic numbers in code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-28 15:45:06 +02:00
parent 9b649c98c9
commit 78d6e17c76
3 changed files with 66 additions and 16 deletions

View File

@@ -139,6 +139,10 @@ func (rw *RouteWatch) Shutdown() {
rw.logger.Info("Flushing prefix handler")
rw.prefixHandler.Stop()
}
if rw.peeringHandler != nil {
rw.logger.Info("Flushing peering handler")
rw.peeringHandler.Stop()
}
// Stop services
rw.streamer.Stop()