Closed volfco closed 5 years ago
Pool::new
will return an error if it's unable to create all of the required connections before the configured timeout.pool.get()
will return an error if it's unable to obtain a connection before the configured timeout.Yep. Configuring the connection_timeout fixes both. It might be useful to document this.
Thanks!
I have two cases where I would like to catch and handle the fact that my DB is down.
In both cases, as far as I can tell, there is no way for me to catch the error and gracefully handle it.
I would expect the
conn.query
to return an error that I can catch when there is a connection issue but it doesn't. In both cases, it spins dumping the following to console:I would love a way where I can gracefully catch and handle this error, and not have the application hang.