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
Make database connection errors more explicit #1029
Conversation
…attempt to provide better errors to user when connections fail. Refs intermine#912, intermine#919
@rnsmith How would you recommend I test this? |
It's quite hard to test reliably. If you set All exceptions should clearly tell you the database has run out of connections. If they don't then more changes are needed. |
build-db for FlyMine didn't fail as expected:
|
Running an individual source didn't give me the error message either.
|
It is giving the correct error message in both cases, I've improved the message. It is possible to get the numbers of active and idle connections from Hikari, I played around with it for a while and couldn't get it working nicely with instances of our http://stackoverflow.com/questions/24187891/get-active-connection-on-hikaridatasource |
Here's the error message I get when trying to run
|
And the same for the individual source in /integrate. Looks good @rnsmith! Thanks. Will merge in once 1.5.4 is finished. |
Make database connection errors more explicit
Attempt to make errors caused by database connection failure more obvious by throwing/handling a specific
DatabaseConnectionException
. Hopefully fixes #919 and #912 but hard to test periodic errors.