My application's job - queue was working smoothly. Supervisor was also works fine before. But in last couple of day this jobs are not processing as before..
No error and nothing on logs file [Edited]
Queue driver set on Database
QUEUE_DRIVER=database
also tried QUEUE_DRIVER=sync
So, I've tried manual work command in vps. Although same code's working on local machine and my test-server And as you can see.. Nothing appears
also tried other commands
php artisan queue:work --queue=default --tries=1
Related
I have a laravel application setup over Ubuntu server using Nginx. Here I have the cron jobs. I was facing an issue, that the server was not automatically picking up changes on Jobs Files. So I googled the things, and found a command from this article which I ran;
php artisan queue:restart
Since I have run this command, now no job is running even. I am also trying with simple HeartbeatJob to log info but it is also not working. When I do php artisan schedule:run,
no error in particular just screen output as:
[2021-09-11T08:41:32+00:00] Running scheduled command: App\Jobs\Heartbeat
But nothing happens. Any idea what this queue command has done wrong and how I make my jobs working again?
Your cron job will need the absolute path to artisan, so should look something like :
php /home/user/site.com/artisan queue:restart
You may also need to specify the queue with :
php /home/user/site.com/artisan queue:restart --queue=nameofqueue
I have setup a laravel vapor as per documentation. Everything is working fine except scheduler.
I have set few artisan commands at certain intervals. But commands are not running as per schedule. If i run command manually it works. Seems like artisan schedule:run is not running and hence commands are not fired on defined time.
I checked lamda cli logs, no errors found. What do i check?
I fixed the issue adding below line in vapor.yml
scheduler: true
This was happening to me but in my case it was solved by composer dump-autoload.
I don't know what exactly happened but when ever I start:
php artisan queue:work & redis-server.exe (windows)
I get a lot of processings for 1 event even tho app is not used (opened on browser)
I am not even using this Event from picture....
I am so unsure why is this happening?
Well using redis-cli flushall and queue:work --tries=1 helped me clean all proceses that were stored within redis and fail after one try.
In my laravel app I have set up table for jobs in my database, and setup the .env file with database driver, I run php artisan queue:work in terminal, but nothing gets uploaded when I try to upload it like that, but when I use sync driver everything works fine.
Not sure why is that and how to fix it so that it works with database driver?
I your terminal run the following
php artisan config:clear
php artisan config:cache
Sometimes when a value is changed in your .env file, you might have to run the aove listed commands for them to take effect. It worked for me
To process new jobs you need to run:
php artisan queue:work
in console as mentioned in Queues documentation
Here's an odd one. I'm running supervisor 3.13 with beanstalkd for a Laravel 4.1 queue. I have a /stage/ and /production/ instances of my app running. I'm running supervisor programs to run artisan queue:listen (out of separate .conf files) for each as follows:
[program:appname-production]
command=php artisan queue:listen --env=production
directory=/home/servername/public_html/production
stdout_logfile=/home/servername/public_html/production/app/storage/logs/supervisord.log
redirect_stderr=true
autostart=true
autorestart=true
The only difference is replacing production with stage in the program. However, when supervisor runs, only the stage program executes correctly. The production program shows FATAL Exited too quickly
appname-production FATAL Exited too quickly (process log may have details)
appname-stage RUNNING pid 6784, uptime 0:32:01
The stage queue is working fine as shown in ps aux. Also, running artisan queue:listen in the production folder works just as it should. When I examine the supervisord log for production however, it's full of:
X-Powered-By: PHP/5.5.20
Content-type: text/html
[InvalidArgumentException]
There are no commands defined in the "queue" namespace.
I've exhausted my technical knowledge of the setup here - I can't seem to reason out why two cloned setups are behaving differently. I've only been able to guess that supervisor is getting boggled somewhere - as I can get the production queue working fine by doing it manually.
All help / ideas are very appreciated.
Finally fixed this and wanted to share. Like other solutions, the fix had to do with setting an absolute path to php. However, the PATH var also needed to be set via environment in the subprocess conf. Here we go:
[program:appname]
command=/usr/local/bin/php artisan queue:listen --env=production
directory=/home/appdir
stdout_logfile=/home/appdir/app/storage/logs/supervisord.log
redirect_stderr=true
autostart=true
autorestart=true
environment=PATH="/usr/local/bin"
Hope this helps someone in the future!