You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Horizon right now, you can specify a memory cap, but this only seems to come into play after each job where the supervisor will restart the individual processes if they've exceeded the specified cap.
So far as I can tell, there is no way to actually alter the memory PHP is allowed to use at runtime. While you can use php.ini to set memory_limit=X, this gets a little tedious for apps with a single consolidated Docker image. PHP has the ability to do this by doing, for example, php -d memory_limit=X artisan horizon. The problem is this only affects the supervisor process, not the individual workers.
Thoughts on having a new setting in the Horizon options that allow us to customize this value at runtime? Maybe 'phpMemory' => '1G', for example. This would then be used when launching the individual worker processes by calling php -d memory_limit=1G artisan horizon:work[...]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
With Horizon right now, you can specify a memory cap, but this only seems to come into play after each job where the supervisor will restart the individual processes if they've exceeded the specified cap.
So far as I can tell, there is no way to actually alter the memory PHP is allowed to use at runtime. While you can use php.ini to set memory_limit=X, this gets a little tedious for apps with a single consolidated Docker image. PHP has the ability to do this by doing, for example, php -d memory_limit=X artisan horizon. The problem is this only affects the supervisor process, not the individual workers.
Thoughts on having a new setting in the Horizon options that allow us to customize this value at runtime? Maybe 'phpMemory' => '1G', for example. This would then be used when launching the individual worker processes by calling php -d memory_limit=1G artisan horizon:work[...]
Happy to work on a PR if this makes sense.
Beta Was this translation helpful? Give feedback.
All reactions