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
Currently, the application fails to start if the underlying database is not available. The following output is logged:
[Nest] 32400 - 17.01.2024, 21:11:29 ERROR [TypeOrmModule] Unable to connect to the database. Retrying (2)...
AggregateError:
at internalConnectMultiple (node:net:1114:18)
at afterConnectMultiple (node:net:1667:5)
It would be nice if the application would start anyway.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: