Hi there, earlier last month, i have followed the docs to use external queue. Instead of going with cron or supervisord, i went with systemd:
[Unit]
Description=InvoiceNinja queue worker
[Service]
User=www-data
Group=www-data
Restart=on-failure
ExecStart=/usr/bin/php /path/to/ninja/artisan queue:work --daemon --env=production
[Install]
WantedBy=multi-user.target
QUEUE_CONNECTION=database
INTERNAL_QUEUE_ENABLED=false
What i have noticed way too late was that invoices to clients weren’t send… or maybe they did in the beginning, not sure about one invoice. However i’ve received the notification emails! - until later though: earlier this month i have noticed that test-offerings did not send me any emails.
Now i know that i wasn’t paid yet because nothing was sent to my clients (later in december).
I have mistakenly added -d register_argc_argv=On
, however correcting the setup last night didn’t change a thing. I am not sure if i also had the schedule
cron still there or if i have added it for testing last night.
I yesterday have testwise run artisan queue:work
manually to work down the pile of scheduled tasks - it went stuck a bunch of times, sent me my notification emails, followed by the note that it could not send the invoices. Also not new ones for testing! Also a few queue tasks did not get processed. No helpful log output!
I have disabled the systemd service and went with cron, but it didn’t send anything either over the night.
I cannot revert to the “normal” setup
Eventually i have tried to revert my setup to the internal queue this morning. It doesn’t do anything either. I used to use the direct artisan path, but here is the current, only, cron entry under the www-data
user:
* * * * * cd /path/ && php artisan schedule:run >> /path/cron.log #/dev/null 2>&1
# other stuff now commented
I have tried:
QUEUE_CONNECTION=database
#INTERNAL_QUEUE_ENABLED=false
QUEUE_CONNECTION=database
INTERNAL_QUEUE_ENABLED=true
# (current)
QUEUE_CONNECTION=sync
INTERNAL_QUEUE_ENABLED=true
I have also tried to force an update, to do queue:restart
, to run update tasks i am aware of:
sudo -u www-data /usr/bin/php artisan optimize
sudo -u www-data /usr/bin/php7.4 artisan config:cache
- made sure the recent update is complete by running composer, migrate
-
view:clear
sudo -u www-data /usr/bin/php artisan ninja:post-update # i am not using git though
Recent cron log:
[2022-01-08T09:50:01+00:00] Running scheduled command: Callback
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
[2022-01-08T09:55:01+00:00] Running scheduled command: Callback
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
[2022-01-08T10:00:02+00:00] Running scheduled command: App\Jobs\Util\ReminderJob
[2022-01-08T10:00:02+00:00] Running scheduled command: App\Jobs\Cron\RecurringInvoicesCron
[2022-01-08T10:00:02+00:00] Running scheduled command: Callback
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
[2022-01-08T10:05:01+00:00] Running scheduled command: Callback
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
[2022-01-08T10:10:01+00:00] Running scheduled command: Callback
Right now sending invoices times out!
No log generated, even with extended log flag!
TimeoutException after 0:00:30.000000: Future not completed
- php v7.4.26
- zip setup