Comments (3)
This seems to be a memory issue with my specific application context. My bad 😬
On second thought, here is some more information.
The issue occurs when running my PHPUnit test suite. When the OomBootstrapper
is setup, memory keeps increasing during the running of the test suite until it hits the limit. If I remove the whole bootstrappers setup, the memory increase is gone and the test suite runs fine.
from bugsnag-laravel.
I have found a solution. The memory leak seems to stem from register_shutdown_function()
handler being called over and over again. This little tricks makes my memory issue go away:
class OomBootstrapper
{
protected static bool $isRegistered = false;
public function bootstrap()
{
if (self::$isRegistered) {
return;
}
$this->reservedMemory = str_repeat(' ', 1024 * 256);
register_shutdown_function(function () use ($app) {
// ...
});
self::$isRegistered = true;
}
}
from bugsnag-laravel.
Hi @wimski, Thanks for raising. Glad you've found a solution for now. We're going to look into this to see what we can do to fix on our side.
from bugsnag-laravel.
Related Issues (20)
- Prepare for Laravel 9 support HOT 5
- Ignore Exceptions in Laravel HOT 2
- Fails composer install for Laravel 9 HOT 2
- Laravel service provider: config is null HOT 5
- Updating minor version HOT 1
- setMetaData doesn't clear between horizon jobs HOT 2
- Unable to create configured logger HOT 6
- PHP Fatal error: Declaration of Bugsnag\PsrLogger\BugsnagLogger::log HOT 4
- Vulnerable versions of Akaunting and Bookstack packages are used HOT 2
- Bugsnag Shows js stack trace and php error codes but no php stacktrace. HOT 2
- Delay session delivery to "after the response is sent" HOT 1
- Error with PHP8.1, Laravel 9.x HOT 2
- laravel 10 compatibility HOT 2
- Update to Laravel 10 HOT 1
- Integrate with Pennant feature flags HOT 1
- Ability to cancel error notifications before they are sent to Bugsnag HOT 1
- How to set app version automatically? HOT 4
- Exceptions in failed Jobs running in queue worker aren't reported to bugsnag. HOT 3
- Support for Laravel 11's Context HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bugsnag-laravel.