IssueRaiser

Allow an app to start when its DataSource is unable to connect to the DB

As long as this doesn't make the code too complicated (possibly it can be done with AOP which is clean), I would say a retry would be best practice for 12factor apps - you shouldn't rely on the database being available on startup, but you can assume that it will come back eventually up to a point. There are probably other places we could do this, but you have to start somewhere. For reference, we have an optional retry (driven by classpath) in spring-cloud-config for the config client connection to the config server. It's a similar issue.

Posted by dsyer on Dec 15, 2015, 10:47 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments

github (SaaS)

Allow an app to start when its DataSource is unable to connect to the DB

dsyerDec 15, 2015, 10:47 AM

As long as this doesn't make the code too complicated (possibly it can be done with AOP which is clean), I would say a retry would be best practice for 12factor apps - you shouldn't rely on the database being available on startup, but you can assume that it will come back eventually up to a point. There are probably other places we could do this, but you have to start somewhere. For reference, we have an optional retry (driven by classpath) in spring-cloud-config for the config client connection to the config server. It's a similar issue.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue