Timeout before mysql container is launched (docker-compose section of the tutorial)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- docker, docker-compose, mysql
- Ambito
- devops, infrastructure
Direzione di ricerca
Read the docker-compose section of the tutorial and the linked commit that introduced the 10-second timeout. Compare the wait-port and depends_on healthcheck suggestions, then verify that the app waits for MySQL to become ready without timing out on slower machines.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Since this commit which add a 10s timeout an older issue is back.
The timeout was removed because it was creating a problem with slow/busy machine which wasn't able to have the mysql container ready before the timeout (which was 15s at that time). In my case I have experiencing the same issue, my mysql container take a bit more than 2min to be fully ready.
Suggestions
Put a much longer timeout, using wait-port or the depends_on condition with the healthcheck instruction in the docker-compose.yaml for example:
app:
...
depends_on:
mysql:
condition: service_healthy
mysql:
...
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
start_period: 5s
interval: 5s
timeout: 5s
retries: 40
(This will take a bit more time than the wait-port solution because the app container will wait the mysql container to be fully ready before starting)
PS: Also wondering how this can take 2min for me (with 8Go RAM and an i5-4210H CPU @ 2.90GHz × 4) when for other people it's look like to take less than 10s.
- Lingua principale
- JavaScript
- Stelle
- 3.1k
- Fork
- 6.3k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di docker/getting-started
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
docker/getting-started#481 · 2 commenti · 5 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
docker/getting-started#494 ·
-
ChatAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
docker/getting-started#482 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 1/100
docker/getting-started#477 ·
-
ToeySuKhothaiAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
docker/getting-started#476 ·
Tutte le issue di docker/getting-started
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Falló el respaldo diarioAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
manuXD270516/descanso#80 ·
I maintainer di solito rispondono entro 2 giorni
-
feat: Warn while typing a forbidden character in a file nameForse già presa @Mittalnew l’ha presa oggi. Apertaapp Drive 📁 enhancement OO Docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
linagora/twake-drive#4620 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
国战吕蒙【谋断】问题Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
Edit: Hello TasteApertachannels:edit check:passed
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno