mysql - Database Connection does not release after idle time out in glassfish -


i using glassfish 3 & mysql5.6.11.

i have created jdbc connection pool in glassfish.

initial , minimum pool size: - 8 maximum pool size: -30 pool resize quantity:- 10 idle timeout: - 60 (second). max wait time:- 2500 (millisecond). 

with parameter have created pool setting.

i have set pool resize quantity value.

when no of connections increase, not release after idle time-out. next time when hit url again increase no of connection, not reuse open connection.

i getting exception

java.sql.sqlexception: error in allocating connection. cause: in-use connections equal max-pool-size , expired max-wait-time. cannot allocate more connections. 

i using show processlist in mysql show open connection.

if 1 knows solution of problem, please share idea me.

i need one.

idle timeout time unused connections in pool remain in pool before closed/recycled. problem having not closing connections after use.

fix code close connections when done them, closing connection release connection pool available reuse.

some connection pools have additional timeouts time connection can used, forcing connection in pool after time. user of connection if connection has been closed. don't think glassfish pool has option though.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -