This PR adds OOM handling to the BugsnagListener's onKernelException method. The implementation is essentially the same as https://github.com/bugsnag/bugsnag-php/pull/621, but has to use a slightly different mechanism as the Bugsnag\Handler class isn't used in Bugsnag Symfony
Note: the Symfony Debug component didn't call onKernelException for OOMs, but the newer ErrorHandler component does. This means the OOM handling won't take affect for Symfony versions below 4.4 (when ErrorHandler was added). I've added support for Symfony 2/3 OOM exceptions anyway, because there's no real overhead of doing so
Changeset
Support for memory_limit_increase config option
OOMs are handled by increasing the memory limit in our onKernelException listener
Waiting on https://github.com/bugsnag/bugsnag-php/pull/621 to be merged & released
Goal
This PR adds OOM handling to the BugsnagListener's
onKernelException
method. The implementation is essentially the same as https://github.com/bugsnag/bugsnag-php/pull/621, but has to use a slightly different mechanism as theBugsnag\Handler
class isn't used in Bugsnag SymfonyThis can be used in conjunction with the new
memory_limit_increase
option (see https://github.com/bugsnag/bugsnag-php/pull/621) to give Bugsnag enough headroom to send OOMsNote: the Symfony Debug component didn't call
onKernelException
for OOMs, but the newer ErrorHandler component does. This means the OOM handling won't take affect for Symfony versions below 4.4 (when ErrorHandler was added). I've added support for Symfony 2/3 OOM exceptions anyway, because there's no real overhead of doing soChangeset
memory_limit_increase
config optiononKernelException
listenerTesting