EspressoSystems / hotshot-query-service

Generic query service for HotShot applications
https://espressosystems.github.io/hotshot-query-service/
GNU General Public License v3.0
3 stars 1 forks source link

Improve reliability of TmpDb startup #655

Closed jbearer closed 2 weeks ago

jbearer commented 2 weeks ago

Because we were only checking for database readiness from inside the container, there was a case where we would consider the TmpDb "ready" and allow connections before the Docker daemon had actually exposed the database port to the host. This change explicitly checks that the port is exposed on the host before returning, with no extra dependencies on the host side.

This fixes an intermittent "Connection Refused" error that @rob-maron and I were seeing while debugging an unrelated sequencer test failure.