Open dschlarmann opened 9 months ago
As far as I can see there is no option to realize this requirement. The underlying TypeORM module does not offer the needed functionality. More information here: https://stackoverflow.com/a/74046031/2873979
As an workaround we could increase the maximum retries as well as retriesDelay. Of course this does not solve the actual problem, but it would offer a softer behavior.
Check the following docs: https://docs.nestjs.com/techniques/database#typeorm-integration --> Properties retryAttempts
and retryDelay
Keep in mind: We should not set the above mentioned properties to an infinite value, since this would only result a later error. If the database is not available, the database itself properly won't be available later on. Instead we should check the "operational" approaches using Rancher, kubernetes, ingress, ....
Currently, the application fails to start if the underlying database is not available. The following output is logged:
It would be nice if the application would start anyway.