From d34e0b928e5e3ae6f307cd6ae5abca7b6b87ecdc Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Wed, 7 Feb 2024 17:29:02 +0100 Subject: [PATCH] Tweaked supervisor definitions --- CHANGES.md | 7 +++++++ config/supervisor/nginx.ini | 4 +++- config/supervisor/php-fpm.ini | 4 +++- config/supervisor/watchdog.ini | 3 ++- 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 CHANGES.md diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..a5dc6c8 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,7 @@ +# Changes + +## 7 Feb 2024 + +- Removed all but the FATAL condition from the watchdog. +- Made the services retry 3 times to properly start. +- This should make it easier to add short-lived workers. diff --git a/config/supervisor/nginx.ini b/config/supervisor/nginx.ini index 62deac9..8e9bdd6 100644 --- a/config/supervisor/nginx.ini +++ b/config/supervisor/nginx.ini @@ -1,7 +1,9 @@ [program:nginx] command=/usr/sbin/nginx -c /etc/nginx/nginx.conf -g 'daemon off;' autostart=true -autorestart=false +autorestart=true +startretries=3 +startsecs=10 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr diff --git a/config/supervisor/php-fpm.ini b/config/supervisor/php-fpm.ini index 5663d72..f979306 100644 --- a/config/supervisor/php-fpm.ini +++ b/config/supervisor/php-fpm.ini @@ -1,7 +1,9 @@ [program:php-fpm] command=/usr/sbin/php-fpm83 -F autostart=true -autorestart=false +autorestart=true +startretries=3 +startsecs=10 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr diff --git a/config/supervisor/watchdog.ini b/config/supervisor/watchdog.ini index 46fae21..7843f26 100644 --- a/config/supervisor/watchdog.ini +++ b/config/supervisor/watchdog.ini @@ -1,3 +1,4 @@ [eventlistener:watchdog] command=sh -c "echo READY && read line && kill -SIGQUIT $PPID" -events=PROCESS_STATE_STOPPED,PROCESS_STATE_EXITED,PROCESS_STATE_FATAL +events=PROCESS_STATE_FATAL +; used to also have PROCESS_STATE_STOPPED,PROCESS_STATE_EXITED,