Timeout before mysql container is launched (docker-compose section of the tutorial)
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- docker, docker-compose, mysql
- Domaine
- devops, infrastructure
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- JavaScript
- Étoiles
- 3.1k
- Forks
- 6.3k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de docker/getting-started
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
docker/getting-started#481 · 2 commentaires · 5 réactions ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
docker/getting-started#494 ·
-
ChatOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 10/100
docker/getting-started#482 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 1/100
docker/getting-started#477 ·
-
ToeySuKhothaiOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 1/100
docker/getting-started#476 ·
Toutes les issues de docker/getting-started
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
Falló el respaldo diarioOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
manuXD270516/descanso#80 ·
Les mainteneurs répondent en général sous 2 jours
-
feat: Warn while typing a forbidden character in a file namePeut-être pris @Mittalnew l’a pris aujourd’hui. Ouverteapp Drive 📁 enhancement OO Docs
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
linagora/twake-drive#4620 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
国战吕蒙【谋断】问题Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
Les mainteneurs répondent en général sous 1 jour
-
Edit: Hello TasteOuvertechannels:edit check:passed
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
Les mainteneurs répondent en général sous 1 jour