"Sentry is attempting to send 1 pending error messages" in gunicorn logs

I’m using the normal hosted sentry for my Python/Django app and everything has been working nicely. Errors and issues are reported and if I try the simple usage example here, I’m receiving an entry in my issues overview.

However when I look at my gunicorn log files, they’re full of this message:

Sentry is attempting to send 1 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit

It keeps repeating about every minute, but when I look at my issues, it seems nothing gets updated. To be honest I’m not entirely sure what this repeated sentry message means. Is some issue “stuck” and cannot be send to sentry.io? How can I debug what sentry thinks is going on? Where or what is this “1 pending error message”?

Some details:

  • Python 3.9.0
  • Django 3.2.2
  • Dentry-sdk 1.1.0
  • Gunicorn 20.1.0
1 Like

I’ve done some more digging myself and used the debug=true setting for Sentry and noticed that a shutdown is being performed right before the log message Sentry is attempting to send 1 pending error messages.

I use gunicorn with the max-requests=100 command-line option and this causes the workers to restart at every 100 requests. This triggered the Sentry message. For testing purposes I have set max-requests to 0 and now the Sentry message no longer appears in the gunicorn logs.

However, this is undesirable as the memory usage of gunicorn slowly grows and will eventually consume more than is available.

I’m still not sure what that " 1 pending error message" is, though… No insights from the community?

Did you ever find a resolution to this?

We’re facing the same issue can’t seem to find a solution

1 Like

The same issue :frowning:

No, never got a real solution for this issue, other than what I remarked in my 2nd message: the undesirable setting of max-requests=0 in the gunicorn command-line. Sad that no sentry official ever responded to this issue, sorry to say…