MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

[SOLVED] Laravel : Supervisor FATAL/BACKOFF Exited too quickly (process log may have details)

Problem

I’m trying to use Laravel queues with a supervisor but the service is not working properly.

<strong>My config /etc/supervisord.d/laravel-worker.conf is:</strong>
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=/usr/bin/php /var/www/my-project/artisan queue:work --sleep=3 --tries=3
autostart=true
autorestart=true
user=root:root
numprocs=8
redirect_stderr=true
stdout_logfile=/var/www/my-project/worker.logCode language: PHP (php)

<strong>When I try to restart all programs:</strong>
$ sudo supervisorctl restart all
$ laravel-worker:laravel-worker_00: ERROR (abnormal termination)
$ laravel-worker:laravel-worker_01: ERROR (abnormal termination)Code language: HTML, XML (xml)

When I try to check status:
$ sudo supervisorctl status
$ laravel-worker:laravel-worker_00: BACKOFF Exited too quickly (process log may have details)
$ laravel-worker:laravel-worker_00: BACKOFF Exited too quickly (process log may have details)

Solution

In my case, the supervisor was exiting very fast because it was finishing before the startsecs and since startsecs wasn’t defined, it uses the default which is 1.

Setting startsecs=0 fixed my issue.

<strong>you need to add startsecs = 0 to your laravel-worker config like so:</strong>
[program:laravel-worker]     
process_name=%(program_name)s_%(process_num)02d
command=/usr/bin/php /var/www/my-project/artisan queue:work --sleep=3 --tries=3
.....
startsecs = 0Code language: HTML, XML (xml)

startsecs is default to 1s, if the program does not stay up for 1s it will see the startup as a failure. Set it to 0 so the program needn’t stay running for any particular amount of time. You can check this GitHub issue for more info: https://github.com/Supervisor/supervisor/issues/212

It would be better if you run the queue worker in daemon mode, use the –daemon flag: command=/usr/bin/php /var/www/my-project/artisan queue:work database --daemon --sleep=3 --tries=3

After you change the config file, you may need to run supervisorctl reload to allow the changes to take effect.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
With MotoShare.in, you can book a bike instantly, enjoy doorstep delivery, and ride without worries. Perfect for travelers, professionals, and adventure enthusiasts looking for a seamless mobility solution.

Related Posts

Laravel: oauth_access_tokens clean up process

using Laravel Passport—the oauth_access_tokens table balloons when tokens aren’t expiring, not being revoked on logout, or not being purged. Here’s a practical, safe cleanup + prevention plan…

Read More

Laravel: Complete Guide of Laravel Passport

Here’s a comprehensive, up-to-date step-by-step tutorial for setting up and using Laravel Passport (OAuth2 API authentication) with clear explanations, working code samples, and troubleshooting tips—suitable for local…

Read More

Laravel: What is APP_KEY in Laravel?

Let’s break down both what APP_KEY is in a Laravel .env file, why it matters, and its use cases. I’ll also explain how it’s generated and what…

Read More

artisan Tutorials: php artisan passport

When you run php artisan passport:install, Laravel attempts to do the following: Running php artisan passport:install is a crucial setup step when using Laravel Passport for API…

Read More

An introduction of Laravel Boilerplate

Laravel Boilerplate is a comprehensive starter kit designed to accelerate the development of Laravel applications by providing a robust foundation with pre-integrated features. Developed by Rappasoft, it…

Read More

Why You Should Avoid Laravel Spark and Stripe/Paddle for Certain Use Cases

✅ Explains why Laravel Spark is not suitable in certain use cases✅ Clarifies the limitations of Stripe and Paddle✅ Lists unsupported countries✅ Guides developers toward the right…

Read More