Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve boot sequence in case of database initialization failure #1948

Open
heharkon opened this issue Apr 21, 2018 · 0 comments
Open

Improve boot sequence in case of database initialization failure #1948

heharkon opened this issue Apr 21, 2018 · 0 comments

Comments

@heharkon
Copy link
Contributor

heharkon commented Apr 21, 2018

Improvement idea based on mailing list discussion about AWS deployment:
**Mailing List **

It was discovered that when deploying a WAR file to AWS Beanstalk, along with H2 database, the application will not function properly. The reason is that Beanstalk doesn't allow write access locally, but H2 db configured with local file configuration would require write access.

In the logs it can be seen that while the DB init will throw an exception, it is ignored and the process is continued, while part of the boot sequence operations will be left undone, for example setting the Classpath for lift snippets. This will be shown as template render failures on browser.

It is however not immediately apparent what is causing these render failures, and in some environments like Beanstalk, accessing the logs can be difficult.

Handling the DB init failure should be better and more apparent for the developer.

At first two different approaches were thought of:

  • In case of db init failure, quit the whole process or,
  • inform about the initialization failure somehow through the browser.

First option would be easier to implement, but poses breaking changes in expected behaviour of Lift.

Also would be good to investigate if applying the other boot sequence operations despite of DB init failure would be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant