You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got my blocky running in a docker-compose setup which also includes a mariadb instance for query logging.
The problem is, even though I've set blocky as dependent on the database it usually doesn't connect to the db on first try and just starts logging to the console instead.
I have to manually restart it.
Since it's all in docker it would be great to have an option to have blocky error if it can't connect to the database since then I can setup docker to restart it until it works (i.e. until the database is ready).
Basically like the failStartOnListError in the blocking section for the database connection.
The text was updated successfully, but these errors were encountered:
The behaviour was changed with #318 . DNS is typically a critical part of the infrastructure - in case of power outage, blocky will be restarted at some time later and should run even if database is down, otherwise you'll have no DNS. Maybe we should add some kind of retry: for example blocky tries 3 times to establish the db connection with 3 seconds pause between attempts?
If you use a single compose file with blocky and mariadb, you can try to add depends_on with "condition: service_healthy" for mariadb. In this case, docker will start mariadb first and if the service is healthy (health check), blocky will be started.
Right, makes perfect sense. I'll try to fix it with my docker setup, thx for the suggestion, but retries sounds like a good idea anyway since my setup probably isn't the only were stuff doesn't always work on the first try.
Also, thanks for making this cool project, I've sent you a coffee (or whatever you want) on PayPal.
0xERR0R
changed the title
Add option to fail if database connection could not be estabilished
Retry to establish db connection for query log
Dec 13, 2021
I've got my
blocky
running in adocker-compose
setup which also includes amariadb
instance for query logging.The problem is, even though I've set
blocky
as dependent on the database it usually doesn't connect to the db on first try and just starts logging to the console instead.I have to manually restart it.
Since it's all in docker it would be great to have an option to have
blocky
error if it can't connect to the database since then I can setupdocker
to restart it until it works (i.e. until the database is ready).Basically like the
failStartOnListError
in theblocking
section for the database connection.The text was updated successfully, but these errors were encountered: