raven-aiohttp icon indicating copy to clipboard operation
raven-aiohttp copied to clipboard

Memory Issue When Application Sends Too Many Errors

Open allisonwang opened this issue 7 years ago • 1 comments

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?

allisonwang avatar Oct 22 '18 21:10 allisonwang

Thoughts:

  1. Modify QueuedAioHttpTransport to be blocking
  2. Keep track of what errors are already sent and discard duplicates

Kentzo avatar Oct 26 '18 23:10 Kentzo