In the config you posted you didn't have RemoveAbandoned configured, by default is is set to false. You also didn't set the maxActive, by default I believe it is unlimited. An example of your code which uses the JNDI named datasource would also be helpfull in debugging these type of problems.
Regards, Glenn Amitabh Dubey wrote: > I used performance monitor to view the number of user connections to the > database. Although i was closing the connection in my client code, the pool > size / connections to the database were always increasing. Given that i was > executing only one program at a time, i would expect that this number not go > on increasing. > > So i closed not only the connections, but resultset and statements as well. > This solved my problem. However, the tomcat dbcp documentation suggests that > we have a removeAbandoned and the timeout for this property also set. My > remove abandones was set to true and the timeout value was 5 secs. But these > values seem to be ignored. So the only sure way out is to close everything > explictly. > > Amitabh > > -----Original Message----- > From: Glenn Nielsen [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 24, 2002 7:22 PM > To: Tomcat Users List > Subject: Re: DBCP pool always increasing > > > What do you mean by your pool is increasing in size? That the number of > open > connections to the db is increaing? What is the indicator that this > is happening? The more specific you can be the better chance that someone > can answer your question. > > Glenn > > Amitabh Dubey wrote: > >>Hello All, >> I managed to use DBCP with SQL Server and am able to get connections > > from > >>the pool. After i execute my query, i close the connection also, but it is >>going back to my pool and i have verified that. However, what I do not >>understand is this : Why does the pool go on increasing and never > > decreasing > >>in size. This is what my server.xml looks like >> >><ResourceParams name="SQLServerDS"> >> <parameter> >> <name>validationQuery</name> >> <value></value> >> </parameter> >> <parameter> >> <name>user</name> >> <value>sa</value> >> </parameter> >> <parameter> >> <name>url</name> >> >> > <value>jdbc:microsoft:sqlserver://dnas07:1113;DatabaseName=NorthWind</value> > >> </parameter> >> <parameter> >> <name>password</name> >> <value>sa</value> >> </parameter> >> <parameter> >> <name>maxActive</name> >> <value>3</value> >> </parameter> >> <parameter> >> <name>maxWait</name> >> <value>120</value> >> </parameter> >> <parameter> >> <name>driverClassName</name> >> <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value> >> </parameter> >> <parameter> >> <name>maxIdle</name> >> <value>5</value> >> </parameter> >> </ResourceParams> >> >> >>If i understand the parameters correctly, then >> >>maxActive --> Maximum number of connections allowed to the database (What >>happens when this number is reached? For me i get a new connection and the >>pool increases. Is this the expected behavior? Can i change it to fail or >>block instead?) >> >>maxidle --> Maximum number of idle connections that the pool should hold >>(For me my pool never goes down to this limit) >> >>maxWait --> Maximum time to wait for a dB connection to become available > > in > >>ms. >> >>removeAbandoned --> recycle connections if the removeAbandonedTimeout is >>reached and the connection is idle. in our case it is true. >> >>removeAbandonedTimeout --> 5 >> >> >>If i am correct, why is my pool growing forever and not reducing in size? >> >>Any ideas? >> >>Amitabh >> >> >>-- >>To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > >>For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>