0

Im using docker version 20.10.8 and docker-compose version 1.29.2, How can i make containers restart automaticly when they are stuck? Of cours from the outside container looks up and runing but the service inside got stuck

they way i know is i see no curl reach containers and no new logs are wriiten, until i restart.

i got 2 containers with guacd + apace guacamole and PostgreSQL:12 container that got stuck because of large query.

How can i make it automatic? they all set to restart: always in docker-compose.yaml but because it doest see container down it just stay stuck until i manually restart them.

Thanks.

Batchen Regev
  • 685
  • 1
  • 7
  • 28
  • What is the state of the application as-reported by docker when it's "stuck?" – Abir Taheer Sep 13 '21 at 15:33
  • in docker-compose ps i see them as "up" and even if i run docker state i see it looks running, its just the application inside gets stuck @AbirTaheer – Batchen Regev Sep 13 '21 at 15:38
  • @HansKilian Hey thanks, i will need to check again when they gets stuck ill run `docker events -f event=health_status` but i guess there is no something that is builtin as i need to create a script .. i see in thred the say to add HEALTHCHECK in Dockerfile but i dont have as this is not an application that i build .. like psql.. ill update thanks! – Batchen Regev Sep 13 '21 at 15:55

0 Answers0