[pax-jdbc-1.1.0] Is this a bug in the connection pool? - Reproducible

33 views
Skip to first unread message

Dutch Dude

unread,
Jun 21, 2017, 12:19:50 PM6/21/17
to OPS4J, erwin....@seecago.com

All -


This is a follow-up on:

After more experimenting I observed the following:

With an under configured connection pool in 1.1.0, as soon as the pool limits are reached, the pooled connections are dropped and from that point forward ea. query sets up a new connection. In addition to that every now and again the mechanism seems to spin out of control, and new connections are created at such a high rate that the OS runs out of ports and the following exception is thrown:


Internal Exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The driver was unable to create a connection due to an inability to establish the client portion of a socket.

This is usually caused by a limit on the number of sockets imposed by the operating system. This limit is usually configurable.


I have rolled back to pax-jdbc-0.9.0 and everything appears to be stable again even when I intentionally under-configure the pool.


FWIW, these are my configurations:


pax-jdbc-0.9.0

osgi.jdbc.driver.class=com.mysql.jdbc.Driver-pool
url
=jdbc:mysql://10.0.1.188:3306/mydb
dataSourceName
=jdbc/mynonjta
user
=<user>
password
=<password>
databaseName
=mydb

#Underconfigured to reproduce issue
jdbc
.pool.maxTotal=5
jdbc
.pool.maxIdle=5


pax-jdbc-1.1.0

osgi.jdbc.driver.class=com.mysql.jdbc.Driver
url
=jdbc:mysql://10.0.1.188:3306/mydb
dataSourceName
=jdbc/mynonjta
user
=<user>
password
=<password>
databaseName
=mydb
pool
=dbcp2

#Underconfigured to reproduce issue
jdbc
.pool.maxTotal=5
jdbc
.pool.maxIdle=5


And this is the system:

mysql driver 5.1.40
pax
-jdbc-1.1.0
mySQL
-5.7.17
Windows Server 2012 R2
Java-1.8.0_121


Regards,


Erwin

Reply all
Reply to author
Forward
0 new messages