1

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()) {....}
user782400
  • 1,617
  • 7
  • 30
  • 51
  • seems to be the socket limitation on DB side – injecteer Nov 13 '19 at 13:23
  • you mean max_connections in MySQL? I've set the value for that to 300 as well. And I've also verified that I receive of 100 connections at the same time from the load generator – user782400 Nov 13 '19 at 14:09

1 Answers1

0

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.

oshai
  • 14,865
  • 26
  • 84
  • 140