- Add semaphore to limit concurrent message handlers to 100 - Drop messages when at capacity instead of creating unbounded goroutines - Track and log dropped messages (every 1000 drops) - Remove nested goroutine spawning in handler loop - Add metrics for dropped messages and active handlers This prevents the memory usage from growing unboundedly when the database can't keep up with the incoming BGP message stream. Messages are dropped gracefully rather than causing OOM errors. |
||
---|---|---|
cmd | ||
docs | ||
internal | ||
pkg/asinfo | ||
.gitignore | ||
.golangci.yml | ||
CLAUDE.md | ||
go.mod | ||
go.sum | ||
Makefile |