db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Della Bitta <mdb2...@columbia.edu>
Subject Re: running out of connections w/ postgresql
Date Fri, 31 Oct 2003 02:13:32 GMT
  i have been running into trouble performing this switch. i was  
following the directions at this site:

http://jakarta.apache.org/turbine/torque-3.0.0/jdbc2pool-howto.html

but it says you need a newer version of the commons-dbcp.jar than was  
included with the Torque distribution that i downloaded (3.0.2).  
upgrading this has become a hassle, because it seems like that project  
has gone through a major revision since (1.1) and i can't find the 1.0  
final release. if i go with dbcp 1.1, it seems like i need to use  
torque 3.1 as well, and commons-pool 1.1. now i'm swapping in three  
jars that are a major release ahead of what i was previously using. i'm  
uncomfortable just doing that, because this application is in  
production, and the problems with the builtin pool didn't surface until  
it launched (even through stress and load testing).

it's a bit of a headache. i'm just copying my application's context and  
trying the upgrades there... i don't know how to evaluate their  
stability if my previous testing didn't uncover the stability problems  
with the older software.

thanks for your help,

michael

On Oct 30, 2003, at 4:50 PM, Eitan Katznelson wrote:

> I had the same problem and switched to the new DataSourceFactory
> org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory. When  
> researching the
> issue on the web, I couldn't find out exactly what was causing it but
> several people have run into this problem.
>
> Hope this helps,
> Eitan
>
> -----Original Message-----
> From: Michael Della Bitta [mailto:mdellabitta1@earthlink.net]
> Sent: Saturday, October 18, 2003 3:55 PM
> To: Apache Torque Users List
>
> Hello,
>
> I currently have a site in production using Torque and connecting to
> PostgreSQL. During my load testing, it held up solidly. But now that I
> have it in production, it keeps on running out of connections. If I
> restart Tomcat, things proceed normally. It seems like Torque isn't
> checking connections back in when it expires them or something.
>
> Here are the properties from my Torque.properties file (identifying
> info altered to protect the innocent):
>
> -------------------------------------------
> torque.applicationRoot = .
>
> log4j.category.org.apache.torque = WARN, org.apache.torque
> log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
> log4j.appender.org.apache.torque.file = /Library/Tomcat/logs/torque.log
> log4j.appender.org.apache.torque.layout =  
> org.apache.log4j.PatternLayout
> log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t]
> %-5p %c - %m%n
> log4j.appender.org.apache.torque.append = true
>
> ## Using torque's old pool
> torque.database.default = dbname
> torque.database.dbname.adapter=postgresql
>
> torque.dsfactory.dbname.factory=org.apache.torque.dsfactory.TorqueDataS 
> o
> urceFactory
> torque.dsfactory.dbname.pool.defaultMaxConnections=25
> torque.dsfactory.dbname.pool.maxExpiryTime=3600
> torque.dsfactory.dbname.pool.connectionWaitTimeout=10
> torque.dsfactory.dbname.connection.driver = org.postgresql.Driver
> torque.dsfactory.dbname.connection.url =
> jdbc:postgresql://127.0.0.1:5432/dbname
> torque.dsfactory.dbname.connection.user = dbuser
> torque.dsfactory.dbname.connection.password = dbpassword
> -----------------------------
>
>
> and i'm initializing Torque using a servlet that's loaded on startup
> like this:
>
> -------------------------------
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> import org.apache.torque.*;
>
> public class InitServlet extends HttpServlet {
>      public void init() throws ServletException {
>          try {
>
> Torque.init("/Library/Tomcat/webapps/appname/torque-3.0.2/
> Torque.properties");
>
>          } catch (TorqueException te) {
>              throw new ServletException("ERROR - Unable to init Torque:
> " + te);
>          }
>      }
> }
> --------------------------------
>
> any ideas, anyone?
>
> thanks,
>
> michael
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message