Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes Problem with database connection pooling resin+mysqlw Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem with database connection pooling resin+mysqlw" Watch "Problem with database connection pooling resin+mysqlw" New topic
Author

Problem with database connection pooling resin+mysqlw

Alagapan Thiagarajan
Greenhorn

Joined: May 31, 2001
Posts: 9
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
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Please don't post duplicate queries in multiple forums. I deleted the copy you left in JSP.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with database connection pooling resin+mysqlw
 
Similar Threads
Resin DB-pooling + authentication. HELP!
resin-web.xml
CDATA problem???
JBOSS startup error
Jboss connection pool doesn't release the connections