rollbar / Rollbar.NET

Rollbar for .NET
https://docs.rollbar.com/docs/dotnet
MIT License
67 stars 44 forks source link

nearly double Ruby memory usage if 900 Rollbar.error(e) invocations in a few hours #563

Closed jpwynn closed 4 years ago

jpwynn commented 4 years ago

Is it normal to see huge (nearly double) Ruby memory increase if Rollbar.error(e) is called an average of 6 or 7 times per minute?

Yesterday we started investigating Rollbar (gem 3.0.0) for use with our several Heroku apps. The first guinea pig was a Rails 4.2.11.1 app, Ruby 2.4.5, Puma web server (4.3.6), 3 workers, 1 thread, on Heroku 2X dynos.

In our evaulation, we enabled Rollbar.error(e) in several places, including some benign-exception 'rescue' blocks that are invoked frequently. This generated about 800 Rollbar events over a 2 hour period (average 6 per minute). And our max-memory nearly doubled from 675MB to 1150MB.

To my surprise, the use of Rollbar.error(e) seems to correlate with very significant memory bloat in Ruby memory.

So it seems even "swallowed" exceptions that would otherwise have no zero impact on user experience will significantly degrade user experience if Rollbar is enabled triggered an average of every 10 seconds.

To be precise, the benign exceptions do not, absent Rollbar, increase app memory use, which you can see in the Heroku memory metric screenshot attached, which shows the two hours before-and-after setting Rollbar's config.enabled to false ... the memory increase did not re-occur under similar traffic conditions once we disabled Rollbar by setting config.enabled = false

Heroku memory use before and after disabling rollbar:

g1

Same timeframe (slightly different scale): Rollbar activity:

g2
akornich commented 4 years ago

@jpwynn , are you sure this is the correct SDK/repo to report Ruby-related issues :) ?

jpwynn commented 4 years ago

ah, didnt notice it was .net sorry. I will copy to ruby gem issues and close this one.