db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Della Bitta <mdellabit...@earthlink.net>
Subject running out of connections w/ postgresql
Date Sat, 18 Oct 2003 23:55:29 GMT
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


Mime
View raw message