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

Raven client doesn't re-establish the connection to the server

Open yuxifu opened this issue 8 years ago • 2 comments

We followed the official document (https://docs.sentry.io/clients/python/usage/) to use Raven client to log events to Sentry server as follows

from raven import Client client = Client(DSN) client.captureMessage(message)

Everything worked perfectly fine as long as the connection to the Sentry server was healthy. However, whenever the connection to the server was down, we had to restart our application to re-initialize the Raven client. It seem that once the connection is down, the Raven client will stop logging all future events, even if the connection comes back later.

The error message we got right after losing the connection was No handlers could be found for logger "sentry.errors".

It would be much better if the client could re-connect to the server when the server comes back.

Did I miss something here?

Thank you!

yuxifu avatar Dec 08 '17 01:12 yuxifu

The client has a backoff timer, so the longer the upstream server is down, the longer it will wait. That said, it shouldn't be maintaining a connection (its HTTP), and the only time it wouldn't retry is when that timer is set.

I would consider setting a handler on sentry.errors, as it's internal errors from the client.

dcramer avatar Dec 08 '17 01:12 dcramer

@dcramer guys, i have the same problem. and i dont know whats happening? detail message : https://forum.sentry.io/t/sentry-responded-with-an-api-error-apierror-no-json-data-was-found/3894

kolapapa avatar May 29 '18 08:05 kolapapa