Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR -- sentry: "exception happened in background worker: execution expired #1878

Closed
gerardo-navarro opened this issue Aug 30, 2022 · 2 comments

Comments

@gerardo-navarro
Copy link

On a production instance, we receive this error message. We have looked into this issue, but we where not able to find the cause for this error until now. We hope that the community has an idea.

Actual Behavior

This error message is logged. The users are not impacted.

The error message suggests that a background worker is involved. This is unexpected as the instance logging this message is a rails (puma) server. The background worker is deployed on another instance and is not logging any sentry-related error messages.


timestamp message
1661697946874 E, [2022-08-28T14:45:46.874085 #12] ERROR -- sentry: "exception happened in background worker: execution expired"

Ruby Version

Ruby 3.0.3

Sentry SDK

5.3.1

Integration and Its Version

  • Rails '~> 6.1.3'
  • Ruby 3.0.3
  • delayed_job (4.1.9)

Sentry Config

# frozen_string_literal: true

Sentry.init do |config|
  config.breadcrumbs_logger = %i[
    active_support_logger
    http_logger
  ]
  config.dsn = Rails.application.credentials.dig(:sentry, :dsn)
  config.environment = Rails.application.credentials.dig(:sentry, :environment)
  config.release = ENV['SENTRY_RELEASE_ID']

  config.traces_sample_rate = 0.0
end
@st0012
Copy link
Collaborator

st0012 commented Aug 30, 2022

Let me clarify the message a bit: the "background worker" here is the SDK's background worker, which is initialized by default for every Ruby process that runs the SDK. So even in Puma webserver's process, there's a SDK's background worker too. It's not your delayed_job background worker.

And the SDK initializes background workers because we want to dispatch user's Sentry events asynchronously but also without using user's worker resource (see #1522 for more info).

As for the execution expired error, it's likely because of the SDK sending Net::HTTP requests (through the background worker) but failed due to some network issues it encountered, which is outside the SDK's control.

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants