Jonas connection pool: Too many connections on the pool (more than the configured max)
We are using Jonas on a project containing Oracle, Hibernate and Spring. The connections are configured via a jndi datasource with minimum connections = 10 and maximum = 30. When there is load on the application, we found that the number of connections on the pool can go over 80!
The log generated by log4jdbc that monitors the connections: 2012-09-12 22:17:52.413 [pool-430906-thread-1] open connections: 1376 1454 1456 1462 1463 1514 1516 1523 1571 1601 1603 1604 1605 1627 1629 1632 1635 1663 1665 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 (87)
Below the datasource configuration:
Max age for jdbc connections
nb of minutes a connection can be kept in the pool
jdbc.connmaxage 20
Maximum time (in mn) a connection can be left busy.
If the caller has not issued a close() during this time, the connection
will be closed automatically.
jdbc.maxopentime 10
Test statement
jdbc.connteststmt select * from dual
JDBC Connection Pool size.
Limiting the max pool size avoids errors from database.
jdbc.minconpool 10 jdbc.maxconpool 30
Sampling period for JDBC monitoring :
nb of seconds between 2 measures.
jdbc.samplingperiod 30
Maximum time (in seconds) to wait for a connection in case of shortage.
This may occur only when maxconpool is reached.
jdbc.maxwaittime 3
Maximum of concurrent waiters for a JDBC Connection
This may occur only when maxconpool is reached.
jdbc.maxwaiters 100
Maximum number of Prepare Statements cached in a Connection
jdbc.pstmtmax 120