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

Handling exceptions caused when sending exceptions to Sentry #14

Open
tremby opened this issue Jul 24, 2014 · 9 comments · May be fixed by #23
Open

Handling exceptions caused when sending exceptions to Sentry #14

tremby opened this issue Jul 24, 2014 · 9 comments · May be fixed by #23

Comments

@tremby
Copy link

tremby commented Jul 24, 2014

We had a serious pileup of exceptions today. Sentry started returning 429 (too many requests) errors, which of course triggered exceptions in Guzzle, which were then put in the queue for Raven to send to Sentry, with the original exception's data stored inside. When these failed to send with more 429 errors, the new 429 is queued with the old 429 stored inside. This snowballed until Sentry started returning 413 (request too large) errors, which were in turn put in the queue, getting exponentially larger until the Redis store ran out of space, causing yet more errors.

I don't know whether this would be considered a bug in Raven or not, but it seems to me that it would be best to ignore (perhaps specific, perhaps all) client errors which come from attempting to send data to Sentry.

Do you have any suggestions on how I can do this?

@pulkitjalan
Copy link

This can be solved by adding the job back into the queue with a delay. This way the errors eventually are added into sentry. #17 does add this with queue jobs.

@rcrowe
Copy link
Owner

rcrowe commented Sep 22, 2014

I wanted to be a littler smarter, you can quickly get an loop that just fills the queue. But it's good enough for now.

@pulkitjalan
Copy link

Looking at ravens own client, it seems it simply discards the error if sentry returns an error from the api.

https://github.com/getsentry/raven-php/blob/master/lib/Raven/Client.php#L620
https://github.com/getsentry/raven-php/blob/master/bin/raven#L66

@tremby
Copy link
Author

tremby commented Feb 26, 2015

I took the relevant bit from your pull request, @pulkitjalan, and put it here #23 -- whatever is holding your pull request back hopefully isn't also holding this segment back.

@tremby tremby linked a pull request Feb 26, 2015 that will close this issue
@clemblanco
Copy link

+1 experienced the exact same problem as trembly is explaining.
Please accept his PR.

@gregholland
Copy link

+1 I've also hit the same issue.

@threesquared
Copy link

+1 same issue

@rcrowe
Copy link
Owner

rcrowe commented Jul 24, 2015

I have zero idea why I didn't merge this 😢 I'll sort it

@threesquared
Copy link

Sorry, any update on this? I am still using the fork from tremby.

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

Successfully merging a pull request may close this issue.

6 participants