Leantime / docker-leantime

Official Docker Image for Leantime https://leantime.io
GNU Affero General Public License v3.0
190 stars 86 forks source link

httpd entered FATAL state, too many start retries too quickly #44

Closed DHS1001 closed 2 years ago

DHS1001 commented 2 years ago

hi there,

after installing the leantime 2.1.8 in the synology nas via docker, leantime is inaccessible randomly after each synology reboot or docker container restart and the browser showing error 502 when inaccessible. Reverse proxy has also been config to allow access via https address.

The log of the container showed below:

Config file already exists!
2022-04-29 11:58:18,058 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2022-04-29 11:58:18,063 INFO supervisord started with pid 7
2022-04-29 11:58:19,066 INFO spawned: 'httpd' with pid 9
2022-04-29 11:58:19,068 INFO spawned: 'php-fpm' with pid 10
[29-Apr-2022 11:58:19] NOTICE: fpm is running, pid 10
[29-Apr-2022 11:58:19] NOTICE: ready to handle connections
2022-04-29 11:58:19,121 INFO exited: httpd (exit status 0; not expected)
2022-04-29 11:58:20,125 INFO spawned: 'httpd' with pid 13
2022-04-29 11:58:20,125 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-04-29 11:58:20,180 INFO exited: httpd (exit status 0; not expected)
2022-04-29 11:58:22,185 INFO spawned: 'httpd' with pid 14
2022-04-29 11:58:22,239 INFO exited: httpd (exit status 0; not expected)
2022-04-29 11:58:25,246 INFO spawned: 'httpd' with pid 15
2022-04-29 11:58:25,301 INFO exited: httpd (exit status 0; not expected)
2022-04-29 11:58:26,302 INFO gave up: httpd entered FATAL state, too many start retries too quickly

Looks like the issue is related to httpd httpd entered FATAL state, too many start retries too quickly. I have tried to put the startsecs = 0 in supervisord.conf file under [program:httpd]. However looks like it is still the same, after each reboot the nas or restart the container, leantime is not accessible due to the same issue.

The env added are as below:

env value
LEAN_DB_DATABASE leantime
LEAN_DB_HOST 192.168.x.x:xxxx
LEAN_APP_URL https://xxxxxx
LEAN_DB_PASSWORD xxxxxx
LEAN_DB_USER leantime
DHS1001 commented 2 years ago

By adding the priority=x to the supervisord.conf in the[program:httpd] and [program:php-fpm] sections seems fix this issue. The service is up and running after each synology reboot.

gersuripj commented 1 month ago

Doesn't work changing priority. I think it's related to this issue https://stackoverflow.com/questions/39803465/why-does-apache2-does-not-remove-pid-file-on-reboot-on-docker-image


I added these lines in [program:httpd]. Weird fix, but it works

redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0