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
After every container restart I noticed that the mails are fetched once then no longer for exactly 10 minutes. After the 10 minutes the mail are fetched once per minute. But it sometimes happens during operation too.
constantly check when the mail was last fetched in the log file /www/logs/freescout/fetch-emails.log
e.g. using watch cat /www/logs/freescout/fetch-emails.log
What is the expected correct behavior?
The freescout cronjob should run once a minute.
Relevant logs and/or screenshots
busybox crond logs process already running nine times after the container is started:
/var/log/cron/cron.log:
crond: crond (busybox 1.36.1) started, log level 8
crond: USER root pid 3228 cmd sudo -u nginx TZ=Etc/GMT php /www/html/artisan schedule:run >> /dev/null 2>&1
crond: user root: process already running: sudo -u nginx TZ=Etc/GMT php /www/html/artisan schedule:run >> /dev/null 2>&1
crond: user root: process already running: sudo -u nginx TZ=Etc/GMT php /www/html/artisan schedule:run >> /dev/null 2>&1
crond: user root: process already running: sudo -u nginx TZ=Etc/GMT php /www/html/artisan schedule:run >> /dev/null 2>&1
crond: user root: process already running: sudo -u nginx TZ=Etc/GMT php /www/html/artisan schedule:run >> /dev/null 2>&1
crond: user root: process already running: sudo -u nginx TZ=Etc/GMT php /www/html/artisan schedule:run >> /dev/null 2>&1
crond: user root: process already running: sudo -u nginx TZ=Etc/GMT php /www/html/artisan schedule:run >> /dev/null 2>&1
crond: user root: process already running: sudo -u nginx TZ=Etc/GMT php /www/html/artisan schedule:run >> /dev/null 2>&1
crond: user root: process already running: sudo -u nginx TZ=Etc/GMT php /www/html/artisan schedule:run >> /dev/null 2>&1
crond: user root: process already running: sudo -u nginx TZ=Etc/GMT php /www/html/artisan schedule:run >> /dev/null 2>&1
crond: USER root pid 3350 cmd sudo -u nginx TZ=Etc/GMT php /www/html/artisan schedule:run >> /dev/null 2>&1
crond: USER root pid 3412 cmd sudo -u nginx TZ=Etc/GMT php /www/html/artisan schedule:run >> /dev/null 2>&1
The first start of schedule:run starts queue:work which runs constantly in the background (as intended). This probably causes crond to detect that the cronjob is already running:
Wow, this is very surprising to me, interesting find. I have other ways of going about this - going to think about this for a bit as this affects quite a few other images of mine as well.
Summary
After every container restart I noticed that the mails are fetched once then no longer for exactly 10 minutes. After the 10 minutes the mail are fetched once per minute. But it sometimes happens during operation too.
it turns out that busybox crond is responsible for that because it avoids concurrent processes for the first 10 minutes as also observed here: https://superuser.com/questions/1803513/busybox-crond-avoids-concurrent-processes-for-first-10-minutes
Steps to reproduce
/www/logs/freescout/fetch-emails.log
e.g. using
watch cat /www/logs/freescout/fetch-emails.log
What is the expected correct behavior?
The freescout cronjob should run once a minute.
Relevant logs and/or screenshots
busybox crond logs
process already running
nine times after the container is started:/var/log/cron/cron.log:
The first start of
schedule:run
startsqueue:work
which runs constantly in the background (as intended). This probably causes crond to detect that the cronjob is already running:ps aux | grep artisan
Environment
Possible fixes
* * * * * TZ=Etc/GMT php /www/html/artisan schedule:run >/dev/null 2>&1 &
The text was updated successfully, but these errors were encountered: