Hello Sébastien! For die-hard people: start-stop-daemon.
start program = "/sbin/start-stop-daemon --quiet --start --background --nicelevel 10 --make-pidfile --pidfile /home/oitmiv/website/queue1.pid --user oitmiv --exec /usr/bin/php7.4 -- /home/oitmiv/website/oitm2021/artisan queue:work --timeout=120 --memory=2048 --tries=1"
as uid "oitmiv" and gid "oitmiv"
stop program = "/sbin/start-stop-daemon --quiet --stop --exec
/usr/bin/php7.4 --remove-pidfile --pidfile
/home/oitmiv/website/queue1.pid --user oitmiv"
as uid "oitmiv" and gid "oitmiv"
Idézem/Quoting Sébastien Desse <[email protected]>:
Hello,
I have a bit of trouble configuring a monitor and would appreciate your
help.
It’s for a php job that runs forever and process a queue, I’ve setup monit
like this:
check process QueuesProcessing
matching "/usr/bin/php /data/symfony/bin/console
PosBundle:ProcessIncoming --env=prod"
start program = "/usr/bin/php /data/symfony/bin/console
PosBundle:ProcessIncoming --env=prod"
as uid www-data and gid www-data
if does not exist then start
It seems it fails to start the command but I’m not sure why:
<mailto:root@BATCH01:/etc/monit/conf.d#> root@BATCH01:/etc/monit/conf.d#
monit validate
'SERVER.VISION_QueuesProcessing' process is not running
'SERVER.VISION_QueuesProcessing' start: /usr/bin/php
'SERVER.VISION_QueuesProcessing' failed to start (exit status -1) -- Program
/usr/bin/php timed out
I Googled this but couldn’t find something that speaks to me.
Would you know why I get a timeout calling php?
Thank you,
Sébastien
SZÉPE Viktor, webes alkalmazás üzemeltetés / Running your application https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md ~~~ ügyelet 🌶️ hotline: +36-20-4242498 [email protected] skype: szepe.viktor Budapest, III. kerület
smime.p7s
Description: S/MIME Signature
