Reputation: 1737
I'm trying to use the com.github.jasync.sql.db library for vertx. I've provided the configuration and set the maxPoolSize to 200. However, during the load generation test; only 7 connections are made to the DB instead of 200
I am unsure what's going wrong. Is this a configuration issue or a library issue? I have followed the tutorial from various websites since I was not able to find a single example for MySQL implementation with connection pool.
ConnectionPoolConfiguration poolConfiguration = new ConnectionPoolConfiguration(
HOST_NAME, 3306, DB_NAME, MYSQL_USER, MYSQL_PASSWD, 200);
Configuration configuration = new Configuration(MYSQL_USER, HOST_NAME, 3306, MYSQL_PASSWD, DB_NAME);
ConnectionPool<MySQLConnection> connection = new ConnectionPool<MySQLConnection>(
new MySQLConnectionFactory(configuration), poolConfiguration);
CompletableFuture<QueryResult> future = connection.sendPreparedStatement("SELECT a,b,c,d,e,f,g from user where a= ? and b= ?", params);
queryResult = future.get();
for (RowData line : queryResult.getRows()) {....}
Upvotes: 1
Views: 186
Reputation: 15365
In order to see the actual configuration turn on debug logging on com.github.jasync.sql.db.pool.ConnectionPool
. You should see a message pool created with configuration ...
with what was configured. (or put a breakpoint and stop at the message).
It will help you understand what is going on.
Upvotes: 0