Skip to content

"Allowed memory size of ... bytes exhausted" #283

Open

Description

@paulrrogers

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

Activity

  1. ArturMoczulski commented on Nov 3, 2017

    @ArturMoczulski
    Contributor

    @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.

  2. ArturMoczulski commented on Nov 17, 2017

    @ArturMoczulski
    Contributor

    I'm closing this issue for now. @paulrrogers if you want us to investigate further we need your help diagnosing this

  3. plaffitt commented on Apr 30, 2019

    @plaffitt

    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 ?

  4. reopened this on May 4, 2019
  5. AronNovak commented on Mar 18, 2020

    @AronNovak
    Contributor

    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.

  6. j6s commented on Jul 21, 2020

    @j6s

    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.

  7. added this to the v4.2.0 milestone on Jan 10, 2025
  8. modified the milestones: v4.2.0, v4.3.0 on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions