Hi,
Urgent.. We are facing a problem with database connection pooling in our production setup.
Our current setup is:
JSP application running on Resin 3.0.12 web server with MySQL 4.0.23 database
We have configured database connection pooling as per resin documentation.
extracted from resin.conf:
<database>
<jndi-name>jdbc/relMgr</jndi-name>
<driver type="com.mysql.jdbc.Driver">
<url>
jdbc:mysql://localhost:3306/relMgr</url>
<user>user1</user>
<password>pwd</password>
</driver>
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>20</max-connections>
<max-idle-time>30s</max-idle-time>
</database>
Problem description:
Randomly the application throws an SQLException with message as'Opearation not allowed after Resultset is closed' or
java.net.SocketException 'Connection reset by peer'.
The datasource(ds) is looked up in the init method and the connection is opened once using ds.getConnection at the top of the
jsp page within a try block and is closed in the corresponding finally block at the very end of the jsp page. The connection
or the result set is not closed anywhere else except in the finally block.
( MySQL is configured with MaxConnections 100 )
Any kind of help is appreciated, Thank you !
Alagapan