<parameter>
<name>maxActive</name>
<value>15</value>
</parameter>
This tells JDBC that the maximum number of connection to be borrowed at any point in time is 15
Increase it to 1000 and test again.
-- John Zoetebier Web site: http://www.transparent.co.nz
On Mon, 24 Nov 2003 17:15:12 -0600, Anthony Presley <[EMAIL PROTECTED]> wrote:
Hello all ....
I've been using DBCP to develop an application for the last 12 months, and it's finally been placed into "active" use. Which is great ... except that it didn't scale very well. When being used by less than 10 or 15 users, it's fine. However, as soon as the number of users increases (or I simulate by clicking on a bunch of database links at one time), I start getting a lot of "'Statement' already closed." error's in my logs.
As far as I can tell, I'm not doing any double closings. Again, this works fine and dandy when there's only a few users, but once several people get on it, it starts with these errors, and they're rather annoying. Most intruiging is that if you wait a few seconds, then try again, requests to the database work fine.
I've thrown in a LOT of log() statements in my code to ensure that the database connections are, in fact, being closed and returned to the pool -- and they are. From what I can tell, they're being closed somewhere in the middle of the processing of them.
My Tomcat config looks like (and I'm using DBCP 1.1 and nightly (have tried both) and Pool 1.1) :
<ResourceParams name="jdbc/ifx" scope="Shareable"> <parameter> <name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter>
<parameter> <name>maxActive</name> <value>15</value> </parameter>
<parameter> <name>maxIdle</name> <value>3</value> </parameter>
<parameter> <name>validationQuery</name> <value>SELECT user.id FROM user WHERE id = 1</value> </parameter>
<parameter> <name>removeAbandonedTimeout</name> <value>300</value> </parameter>
<parameter> <name>removeAbandoned</name> <value>true</value> </parameter>
<parameter> <name>maxWait</name> <value>10000</value> </parameter>
<parameter> <name>driverClassName</name> <value>com.informix.jdbc.IfxDriver</value> </parameter>
<parameter> <name>url</name> <value>jdbc:informix-sqli://ids:1314/development:INFORMIXSERVER=london_net</value> </parameter> </ResourceParams>
A chunk of the log is:
2003-11-24 17:04:29 InternalClients: Closing connections 2003-11-24 17:04:29 InternalClients: ERROR: Servlet InternalClients, SQL Error lookup up General Information: 'Statement' already closed. RootCause: null: /Error 2003-11-24 17:04:29 InternalClients: ERROR: Servlet InternalClients, General Error viewing internal client information: null RootCause: null: /Error 2003-11-24 17:04:29 InternalClients: Closing connections 2003-11-24 17:04:29 InternalClients: Closed 2003-11-24 17:04:29 StandardWrapperValve[InternalClients]: Servlet.service() for servlet InternalClients threw exception java.lang.IllegalStateException at org.apache.coyote.tomcat4.CoyoteResponseFacade.sendRedirect(CoyoteResponseFacade.java:340) at azure.servlets.Azure.err(Azure.java:76) at azure.servlets.InternalClients.processRequest(InternalClients.java:199) at azure.servlets.InternalClients.doGet(InternalClients.java:34) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
Again, the link that generated the error .... clicking on it right after it logged these error's, it works fine. Which obviously (to me?) leads me right to ... a problem with the DBCP, or the DB, or my code. These are not simple problems to troubleshoot, it appears.
I can post the code the generates this .... if that would help. At this point in the game, I'm pretty much at my wits ends.
Any help is much appreciated ....
--Anthony
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
