tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: Connection Pool Exhausted
Date Sat, 15 Aug 2009 14:27:07 GMT
I know I'm coming late to the party and starting with the original post
to boot.

I see a third party app (not developed by Kristen) that ran perfectly
before a restart caused some problems.  Given this, I'm of the feeling
there's a config problem OR some other app on the same tomcat instance
is leaking the connections. 

Below, I see two <Resource ... /> elements in your <Context ...> ...
</Context>.  Is that really in the config or am I seeing a cut/paste
problem?

Are there anything other webapps running on this tomcat that might
access that db pool?

Given this started with a reboot, could you think of anything that might
have changed between that reboot and the last time tomcat started before
that?

--David

kwalker@sbceo.org wrote:
> Apologies for hijacking a previous thread - hopefully this post will start a new
> thread.
>
> Hi everyone,
> I run uPortal 2.53 on Ubuntu with java-1.5.0-sun-1.5.0.18, tomcat5.5.25,
> Apache2, mod_jk.  I have run uPortal for over two years using the Ubuntu
> install of Tomcat 5.0.  A few weeks ago I restarted Tomcat 5.0 and got a
> rendering error from uPortal.  Since this is our live site, I panicked and
> installed Tomcat 5.5.25 manually.  The site seemed happy enough and I went
> home thinking the problem was solved.
>
> Unfortunately, uPortal came down during the night and was showing a uPortal
> error on the main page.  When I checked the logs I saw errors over and over
> and over again indicating that the connection pool was exhausted and a
> connection to the database could not be made.
>
> Here is what the error in the log looks like:
>
> Caused by: org.springframework.dao.DataAccessResourceFailureException:
> RDBMServices sql error trying to get connection to uportal; nested exception
> is org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
> exhausted
>
> I have been troubleshooting this for weeks now.  I have updated the mysql
> connector driver from mysql-connector-java-3.1.12-bin.jar to
> mysql-connector-java-5.1.8-bin.jar.  We were running on a Feisty Fawn box -
> I reinstalled the whole site on Jaunty Jacolope and still see the same
> problem.  I have tried messing around with ROOT.XML.  Here is what is there
> now:
>
> <Context path="" docBase="ROOT" crossContext="true">
>   <Resource name="jdbc/PortalDb" auth="Container"
> type="javax.sql.DataSource"
>     username="MYUSERNAME" password="MYPASSWORD"
>     driverClassName="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost:3306/uportal_revert"
>     maxActive="100" maxIdle="30" maxWait="10000" removeAbandoned="true"
> removeAbandonedTimeout="30" logAbandoned="true"/>
>
>   <Resource name="jdbc/PersonDb" auth="Container"
> type="javax.sql.DataSource"
>     username=" MYUSERNAME" password=" MYPASSWORD"
>     driverClassName="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost:3306/uportal_revert"
>     maxActive="100" maxIdle="30" maxWait="10000" removeAbandoned="true"
> removeAbandonedTimeout="30" logAbandoned="true"/>
>
>     <!-- Disables restart persistence of sessions -->
>     <Manager pathname=""/>
>
> </Context>
>
>
> The site does not go down unless there is some load on it.  I can make the
> problem happen by simulating load with JMeter.  Also, I installed Lambda
> Probe to see if I can see anything there, but I am not really sure what to
> look for.
>
> I am leaning towards believing that there is something misconfigured in
> Tomcat given that the mysql/java/apache/mod_jk configuration is the same
> that we have had for the last two years and the site ran fine.  Tomcat is
> the only thing I have really changed.  It might be a leak, but I have not
> added any code to the code we have used for the past two years, and I am
> unsure of how to detect if it is a leak.
>
> Does anyone have any troubleshooting tips or advice?   Right now I have a
> cronjob restarting Tomcat every hour to keep the site hobbling along, but
> this is really terrible to do on a live site.
>
> Thanks in advance!
> Kristen
>
>
>   


-- 
David Smith
Programmer/Analyst
College of Agriculture and Life Sciences
Cornell University
B32 Morrison Hall
Ithaca, NY 14853
Phone: (607) 255-4334


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message