rollbar-php
rollbar-php copied to clipboard
"Allowed memory size of ... bytes exhausted"
Apparently some of my exceptions have a deep trace or otherwise are overflowing memory. Any chance Rollbar's error unwinding could be made less memory intense?
1 File "/.../vendor/rollbar/rollbar/src/rollbar.php", line 184 in Rollbar\DataBuilder::generateErrorWrapper 2 File "/.../vendor/rollbar/rollbar/src/rollbar.php", line 161 in Rollbar\Rollbar::generateErrorWrapper 3 File "/.../vendor/rollbar/rollbar/src/DataBuilder.php", line 981 in Rollbar\Rollbar::fatalHandler
@paulrrogers thanks for bringing this up. Can you explain more how your error reporting is too verbal? I would love to see so some examples of error reports that are just too memory intensive. Especially the ones that are causing the memory exhaustion.
I'm closing this issue for now. @paulrrogers if you want us to investigate further we need your help diagnosing this
Hello, I'm currently using Rollbar-php 1.4.1, and I have this error too. Here is what I get on rollbar.com from my production server:
E_ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 98570240 bytes): Allowed memory size of 134217728 bytes exhausted (tried to allocate 98570240 bytes) (Most recent call first)
File /composer/vendor/rollbar/rollbar/src/Payload/EncodedPayload.php line 37
I can help you to investigate further, what do you need to know ?
We do have the same symptom. There's a complex flow in the Drupal application, without Rollbar, it works, with Rollbar, the memory limit is exceeded. Likely a notice or a warning is generated at some point and Rollbar doesn't have enough memory to prepare properly the payload that should be sent to the server. Checking what could be done about it.
We had this problem as well. In our case it turned out that the stack traces contained UploadedFile objects which were tried to be encoded fully. Extending Rollbar\RollbarLogger and customizing getPayload to filter out / replace these objects with static strings did the trick in our case.