#Health-check another container

1 messages · Page 1 of 1 (latest)

opal stump
#

Hi friends. I'm new to Dagger, be gentle. I've got a dev container (TiDB) which is spontaneously hanging--or so I suspect. I routinely notice that I can no longer connect to it or run queries, and by bringing it down and up again everything is fine. It's killing my vibe a little 🙂

Now, on the one hand, I'd love to learn how to get richer diagnostics and see if I'm taking crazy pills and/or what's causing this failure mode.

On the other hand, I'm exploring a passive health-check, which can be done with a shell script that runs SELECT 1 every few seconds, but wondering if it makes sense to stand up another dagger container to monitor the misbehaving one. RFC: Would that be a weird use-case, an antipattern, or somewhat reasonable?

stark shale
#

Either way it seems like a reasonable use case

stark shale
#

if it's external: dagger core container from --adress=mysql with-service-binding --endpoint=tcp://localhost:4000 --alias=tidb with-exec --args=sh,-c,'while true; do mysql -h tidb:4000 -e "select 1"; done'

opal stump
#

Run by dagger yes, not external. Thanks Solomon!

stark shale
#

in that case just pass myTiDBContainer.asService() as argument to the service binding and you should be good

barren folio