acassan/supervisord-bundle
Laravel/PHP bundle for managing Supervisord: configure supervisor programs, control processes, and monitor status from your application. A lightweight wrapper to simplify integrating supervisord-based workers and services into your project.
acassan/supervisord-bundle provides a Laravel integration for Supervisord, a process manager for Unix-like systems. It is well-suited for managing long-running background processes (e.g., queues, cron jobs, APIs, or CLI tasks) within a Laravel application.config/ and potentially services.yaml (if using Symfony’s DI), reducing manual Supervisord XML/INI file management.php artisan queue:work) out of the box, or is manual process definition required?.env)?queue:work, queue:listen).schedule:run).composer require acassan/supervisord-bundle.php artisan vendor:publish --provider="Acassan\SupervisordBundle\SupervisordBundle".config/supervisord.php (or equivalent).'processes' => [
'queue_worker' => [
'command' => 'php artisan queue:work --sleep=3 --tries=3',
'numprocs' => 4,
'autostart' => true,
'autorestart' => true,
],
],
supervisord -c /path/to/config.supervisorctl reread && supervisorctl update && supervisorctl restart all.pdo_mysql for database jobs).supervisorctl status).composer why-not acassan/supervisord-bundle).supervisorctl, supervisord -c).tail -f /var/log/supervisord.log.php artisan queue:failed for Laravel queues).numprocs based on server size).memory_limit, numprocs, and priority in Supervisord config.supervisorctl top or Prometheus.autorestart: true and startsecs to handle graceful restarts.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Bundle fails to load | Processes not managed | Fallback to manual Supervisord config. |
| Supervisord crashes | All managed processes die | Use supervisord -c /path/to/config --nodaemon for debugging. |
| Process memory leak | OOM kills or degraded performance | Set memory_limit and stopsignal in config. |
| Laravel config error | Invalid Supervisord processes | Validate config with supervisord -t. |
| Network partition (distributed) | Processes on one server die | Use health checks and auto-restart. |
| Permission issues | Processes fail to start | Run Supervisord as a dedicated user (e.g., www-data). |
supervisord.conf, supervisorctl, and process directives.How can I help you explore Laravel packages today?