You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought there was a queue system or sthg like that but when I do too many request with my connection pool, I have these error: ERROR com.github.mauricio.async.db.postgresql.PostgreSQLConnection - Can't run query because there is one query pending already
Each request are done from a connection of the pool then Connection is closed:
res.result().queryStream(sqlCommand, resultSetStream -> { //do the job}).close();
res.result().queryStream(sqlCommand, resultSetStream -> { //do the job}).close();
This actually will return the connection before the query finishes, it's not surprise that you get the exception, you should close the connection inside //do the job
I thought there was a queue system or sthg like that but when I do too many request with my connection pool, I have these error:
ERROR com.github.mauricio.async.db.postgresql.PostgreSQLConnection - Can't run query because there is one query pending already
Each request are done from a connection of the pool then Connection is closed:
res.result().queryStream(sqlCommand, resultSetStream -> { //do the job}).close();
here is my pool setup
JsonObject postgreSQLClientConfig = new JsonObject().put("host", "10.203.62.160").put("port", 5432).put("username", "postgres").put("password", "postgres").put("database", "XXX") .put("maxPoolSize", 3); SQLClient postgreSQLClient = PostgreSQLClient.createShared(vertx, postgreSQLClientConfig);
I thought connection taken from the pool where free from query, do I have to check the connection state and queue the query myself?
The text was updated successfully, but these errors were encountered: