Continuing this report from a discord thread I created a few days ago. We have been investigating our Sidekiq workers becoming unresponsive and think we traced the issue to a combination of two things.
First, a SystemStackError when serializing the breadcrumbs - here's some relevant logging
A more insidious issue followed - it seemed that when this error occurred the background thread got stuck. Eventually our sidekiq instances stopped responding altogether. We think this was fixed by disabling background workers on Sidekiq:
config.background_worker_threads = 0 if Sidekiq.server?
After setting this we've no longer seen crashes, but it's also possible that it just lowered the rate of issues enough that the daily cycling of sidekiq prevented it from ever getting to the point of killing a dyno entirely.
Reproduction Steps
Unsure - potentially trying serialize a very large object.
Expected Behavior
SystemStackErrors don't occur at all
Failures in the background worker are handled gracefully
Actual Behavior
SystemStackError occurs while serializing a breadcrumb
Issue Description
Discord thread
Continuing this report from a discord thread I created a few days ago. We have been investigating our Sidekiq workers becoming unresponsive and think we traced the issue to a combination of two things.
First, a SystemStackError when serializing the breadcrumbs - here's some relevant logging
I believe https://github.com/getsentry/sentry-ruby/issues/2393 was created to address this.
A more insidious issue followed - it seemed that when this error occurred the background thread got stuck. Eventually our sidekiq instances stopped responding altogether. We think this was fixed by disabling background workers on Sidekiq:
After setting this we've no longer seen crashes, but it's also possible that it just lowered the rate of issues enough that the daily cycling of sidekiq prevented it from ever getting to the point of killing a dyno entirely.
Reproduction Steps
Unsure - potentially trying serialize a very large object.
Expected Behavior
Actual Behavior
Ruby Version
3.1.3
SDK Version
5.9.0
Integration and Its Version
No response
Sentry Config
No response