tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristen Walker <kwal...@sbceo.org>
Subject Connection pool exhausted
Date Fri, 14 Aug 2009 23:02:14 GMT
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


--
Kristen Walker

Digital Media Resources Developer
Instructional Media Services
Santa Barbara County Education Office
4400 Cathedral Oaks Road
P.O. Box 6307
Santa Barbara, CA 93160-6307
(805)964-4711 ext. 5244/FAX (805)683-3597
kwalker@sbceo.org
http://www.sbceoportal.org




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


Mime
View raw message