db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Courcoux <pe...@courcoux.biz>
Subject Re: running out of connections w/ postgresql
Date Sun, 19 Oct 2003 12:04:06 GMT
Michael,

This is a known issue. Comment out the section referring to Torque's old
pool and use the jdbc2 pool (Next section in Torque.props).

Regards,

Peter

On Sun, 2003-10-19 at 00:55, Michael Della Bitta wrote:
> 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.TorqueDataSo 
> 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
-- 
Peter Courcoux <peter@courcoux.biz>

---------------------------------------------------------------------
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