bugsnag / bugsnag-agent

A forwarding agent for BugSnag to guarantee minimal reporting impact.
MIT License
14 stars 9 forks source link

Bugsnag gets lost when request is big (bugsnag-node) #11

Closed rafaelspecta closed 6 years ago

rafaelspecta commented 8 years ago

In our case, Bugsnag does not work either with a huge amount of data (example 729k of json in the body). It also gets lost and error never reaches the Bugsnag server, or reaches it incorrectly cause it is never shown in the interface. Same test with a smaller json works just fine. We are using bugsnag with nodejs.

We are using bugsnag-node and it has this problem as well github.com/bugsnag/bugsnag-node

As mentioned on another issue #8 that seemed to have a similar problema on bugsnag-php For requests over 1024 bytes, the curl HTTP client (used by PHP lib) adds Expect: 100-continue which trips up the agent and the response is extremely slow.

kattrali commented 8 years ago

Thank you for the report, @rafaelspecta. Can you provide an example of a report reaching the server incorrectly? If it would expose private data, feel free to send it to support@bugsnag.com and we’ll continue there.

rafaelspecta commented 8 years ago

Following is the json body I sent that caused the problem. If I send a smaller json body everything works fine.

CollectSend-8e15.json.gz

kattrali commented 8 years ago

Thanks for the test case. The current payload size limit of the API is 512kb. I’ve updated the docs to be clearer on this point. Going forward though, we could perhaps update the individual libraries (or maybe agent itself) to intelligently trim payloads which will be rejected.

rafaelspecta commented 8 years ago

I think that is a great suggestion. The most important thing is not losing the error notification. If we have a large payload we can implement ourselves another way to logging that if the hole payload is really important. But never miss the error notification.

How would you trim it?

snmaynard commented 6 years ago

This should be solved at the notifier level as you wouldn't want the agent to be repsonsible for parsing and understanding these payloads. I'll raise an issue on our node notifier to ensure that payload trimming is including in the upcoming major version