raven-aiohttp
raven-aiohttp copied to clipboard
Memory Issue When Application Sends Too Many Errors
We are using AioHttpTransport when sending errors to Sentry. But (based on the documentation here "Each new message spawns it owns asyncio.Task, amount of them is not limited") if the application keeps sending large amount of error messages, this will cause memory leak and eventually the box will run out of memory. But if we use QueuedAioHttpTransport, the extra errors will simply get omitted if the queue is full.
I am wondering what's the best way to handle this issue?
Thoughts:
- Modify QueuedAioHttpTransport to be blocking
- Keep track of what errors are already sent and discard duplicates