# Should-Start: postgresql mysql # Should-Stop: postgresql mysql
Hi,I am using Orthanc as a docker image (19.6.2) and MySql docker image (8.0).Sometimes, after starting docker-compose, I see that Orthanc has crashed with error that the DB is not available. This happens about 20 seconds after I start the docker-compose. If I then start the crashed container later using 'docker start' then it works fine.Is there a solution for this? Can I set the timeout for DB connection to be longer?Following is an image of what I see in the logs:
--
You received this message because you are subscribed to the Google Groups "Orthanc Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orthanc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orthanc-users/e184f320-e362-4efa-afe5-2aed829d01c8%40googlegroups.com.
Alain Mazy / Software Developer
a...@osimis.io / +32 494 31 67 27
OSIMIS S.A. | |
To unsubscribe from this group and stop receiving emails from it, send an email to orthan...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orthanc-users/e184f320-e362-4efa-afe5-2aed829d01c8%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to orthanc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orthanc-users/65be2f13-e18b-4682-91cc-a71266f9019e%40googlegroups.com.
I think this "crash/exit" only happens when the DB is not available at startup. To me, it makes sense not to retry a billion times at that time. However, I agree we could implement a smarter retry policy.During operation, Orthanc shall not crash if the DB is not available although there are still some improvements to be implemented regarding that topic: https://bitbucket.org/sjodogne/orthanc/issues/83/serverindex-shall-implement-retries-for-db
To view this discussion on the web visit https://groups.google.com/d/msgid/orthanc-users/65be2f13-e18b-4682-91cc-a71266f9019e%40googlegroups.com.
design your application to attempt to re-establish a connection to the database after a failure. If the application retries the connection, it can eventually connect to the database.
The best solution is to perform this check in your application code, both at startup and whenever a connection is lost for any reason
--
You received this message because you are subscribed to the Google Groups "Orthanc Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orthanc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orthanc-users/e21e932b-c1bd-4818-ab40-0a9f442a1915%40googlegroups.com.
Hello,
What would you concretely suggest as a complete solution?Having a configuration option to make Orthanc endlessly retry to connect to the database (instead of 10 times as currently implemented)?Sébastien-
To unsubscribe from this group and stop receiving emails from it, send an email to orthan...@googlegroups.com.