• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Problem with database connection pooling resin+mysqlw

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please don't post duplicate queries in multiple forums. I deleted the copy you left in JSP.
 
Don't destroy the earth! That's where I keep all my stuff! Including this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic