Why is my dockerized nginx proxy getting stuck in a boot loop?
-
My dev stack contains the following pieces (all in docker with a registry of images I can't touch).
- a database instance, pre-seeded with test data.
- a web stack (LAMP).
- a nginx reverse proxy to push requests to the right places.
The first two work perfectly. The third....
It gets stuck in a "health: starting" state, and then gets killed. And restarted. and killed. And restarted. The logs just say it's being sent a SIGTERM 15 about 1 minute after it starts.
My thought is the healthcheck is killing it because it isn't starting fast enough or something, or making it look like it's not reachable (so docker kills it). But I have no clue how to get it to start faster. Or even if that's the issue.
Any ideas on where to start?
-
If you can't touch images, what is it you can even do to resolve this? This nging docker running locally on your computer? Can you shell in?
-
@cartman82 said in Why is my dockerized nginx proxy getting stuck in a boot loop?:
If you can't touch images, what is it you can even do to resolve this? This nging docker running locally on your computer? Can you shell in?
I can adjust the stack
docker-compose.yml
file.And yes, it's running (or trying to) locally. I can shell in (even though it says "health: starting"). But I'm not sure what I'm looking for there at all.
-
@Benjamin-Hall said in Why is my dockerized nginx proxy getting stuck in a boot loop?:
@cartman82 said in Why is my dockerized nginx proxy getting stuck in a boot loop?:
If you can't touch images, what is it you can even do to resolve this? This nging docker running locally on your computer? Can you shell in?
I can adjust the stack
docker-compose.yml
file.And yes, it's running (or trying to) locally. I can shell in (even though it says "health: starting"). But I'm not sure what I'm looking for there at all.
I can shell in, but less than a minute later the process gets killed out from under me.
-
Solution (for now): disable the healthcheck in the
docker-compose.yml
healthcheck: disable: true
Seems to allow it to be stable.
-
@Benjamin-Hall said in Why is my dockerized nginx proxy getting stuck in a boot loop?:
Solution (for now): disable the healthcheck in the
docker-compose.yml
healthcheck: disable: true
Seems to allow it to be stable.
You can also replace the healthcheck with the correct one, but in your case, I think this is correct solution. As long as the nginx is really just a proxy and nothing else, all
curl
checks would actually test the real application and that is quite useless (if the application is broken, restarting the proxy in front of it makes no sense).
-
What is the healthcheck checking? Probably just getting a response from a URL. Does that path exist? Can you change it?