"docker stop nominatim" does not trigger "service postgresql stop" #284
Unanswered
JonasHeidelberg
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I think it's just a bug in the image. I've seen it before and it's quite worrying however postgres seems to recover from the cold shutdown. If you have an idea about how to shutdown cleanly, we'd love to have a PR. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Whenever I have to stop my nomatim-docker container and restart it, I am told by postgres (output of
tail -f /var/log/postgresql/postgresql-12-main.log
):database system was not properly shut down; automatic recovery in progress
The /app/start.sh script contains a block
which looks to me like it should trigger
service postgresql stop
whenever I dodocker stop nominatim
on the host machine. However, this does not work for me. Only if I manuallydocker exec -it nominatim service postgresql stop
beforedocker stop nominatim
I can avoid the postgresql error message about improper shutdown.Update: I tried increasing the time between docker sending SIGTERM and SIGKILL from 10 to 30 seconds (
docker stop -t 30 nominatim
) but this had no effect. The container still terminated with errorcode 137, which I understand means the PID 1 process did not end gracefully, and I still see the postgresql error message when launching the container the next time.In case this matters, I roughly follow the 2nd example from https://hub.docker.com/r/mediagis/nominatim/ - more specifically
Am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions