quarkus: Vertx PgPool lost connection unexpectedly
When a user gets a connection frompgPool
some milliseconds behind IDLE expiration time, then “sometimes” when you are going to use the connection, you get the following error from the server:
Fail to read any response from the server, the underlying connection might get lost unexpectedly.
So, looks that the connection it’s available when you request it, but then disappears when you use it.
Expected behavior The connection should be validated (maybe by a query), before return an available connection.
Actual behavior An end-user could get a connection that is not available anymore.
To Reproduce
You could run the following test
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 31 (24 by maintainers)
Commits related to this issue
- Document Reactive DataSource idle-timeout limitation Follows-up on #14737 See #14608 — committed to tsegismont/quarkus by tsegismont 3 years ago
- Document Reactive DataSource idle-timeout limitation Follows-up on #14737 See #14608 (cherry picked from commit fbe0e41b89f3d8b2465fc6d355ff0d16d3c7f939) — committed to gsmet/quarkus by tsegismont 3 years ago
@rsvoboda Vert.x 4.1 will come a new pool implementation. The refactoring PR is being reviewed. eclipse-vertx/vertx-sql-client#41 is planned for 4.1 but on hold until the refactoring PR is merged.
In the meantime, I will update #14737 to add the retry example and details about the TCP-level idle-timeout property.
@gavinking I will check with the team how we can prioritize an implementation of pool idle timeout in 3.9 branch too.