mirror of
https://github.com/docker/compose.git
synced 2025-07-14 09:14:26 +02:00
Update FAQ regarding long stop times
- It happens on recreate, not just stop - We now support `stop_signal`, which can help in some cases Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
1502c5a14d
commit
62fb6b99eb
@ -15,7 +15,7 @@ weight=90
|
|||||||
If you don’t see your question here, feel free to drop by `#docker-compose` on
|
If you don’t see your question here, feel free to drop by `#docker-compose` on
|
||||||
freenode IRC and ask the community.
|
freenode IRC and ask the community.
|
||||||
|
|
||||||
## Why do my services take 10 seconds to stop?
|
## Why do my services take 10 seconds to recreate or stop?
|
||||||
|
|
||||||
Compose stop attempts to stop a container by sending a `SIGTERM`. It then waits
|
Compose stop attempts to stop a container by sending a `SIGTERM`. It then waits
|
||||||
for a [default timeout of 10 seconds](./reference/stop.md). After the timeout,
|
for a [default timeout of 10 seconds](./reference/stop.md). After the timeout,
|
||||||
@ -40,6 +40,12 @@ in your Dockerfile.
|
|||||||
* If you are able, modify the application that you're running to
|
* If you are able, modify the application that you're running to
|
||||||
add an explicit signal handler for `SIGTERM`.
|
add an explicit signal handler for `SIGTERM`.
|
||||||
|
|
||||||
|
* Set the `stop_signal` to a signal which the application knows how to handle:
|
||||||
|
|
||||||
|
web:
|
||||||
|
build: .
|
||||||
|
stop_signal: SIGINT
|
||||||
|
|
||||||
* If you can't modify the application, wrap the application in a lightweight init
|
* If you can't modify the application, wrap the application in a lightweight init
|
||||||
system (like [s6](http://skarnet.org/software/s6/)) or a signal proxy (like
|
system (like [s6](http://skarnet.org/software/s6/)) or a signal proxy (like
|
||||||
[dumb-init](https://github.com/Yelp/dumb-init) or
|
[dumb-init](https://github.com/Yelp/dumb-init) or
|
||||||
|
Loading…
x
Reference in New Issue
Block a user