tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Turner <arm...@gmail.com>
Subject Connection Pool Woes
Date Fri, 20 Jan 2006 15:36:43 GMT
I am using Tomcat 5.5.12 on RedHat ES 4.

I have a server that is set to maxThreads="5", maxSpareThreads="5",
and when I use a Simply Data Source, that does not pooling, if I hit
the page a lot, I get over 30 connections opened, with database
connections that are not closing quickly at all.  If this runs in
production, I'm going to run out of database connections.

If I try a pooling datasource, the same thing happens, except the
server hangs on what I assume is the process to open a new connection
once it hit's the connection pool's maxConnections number.

I am using JSTL sql and core to do database queries, and I have a
servlet called InitServlet that instantiates a DataSource and sets it
as the default datasource.

I am using Postgresql as my database, and using Jdbc3PoolingDataSource
as my pooling datasource, and PGSimpleDataSource for my simple data
source.

What can I do to get these connections to close once a servlet or JSP
has finished running?  The plan is do have dozens of applications
running on this server, and if each app has it's own connection set,
I'm gonna run out of connections really fast.

Alex

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


Mime
View raw message