laravel / horizon

Dashboard and code-driven configuration for Laravel queues.
https://laravel.com/docs/horizon
MIT License
3.83k stars 643 forks source link

Output console error when terminating due to memory usage #1391

Closed SanderMuller closed 6 months ago

SanderMuller commented 6 months ago

In #463 the memory limit was made configurable, however, when the memory limit is set too low (e.g. in my case more memory was being used than the default 64MB), Horizon will just fail silently.

For months Horizon was "broken" in one of my projects and I couldn't figure out why. No console output, no log output. The same is the case for #375.

This PR adds clear console output when php artisan horizon terminates due to using more memory than configured (or the default 64MB)

Before this PR: image

After this PR: image

I first just added the output without the change in src/Console/HorizonCommand.php, that is still an option. The output is then:

image