I'm running Tomcat 4.1.18 with Struts (release version) on RedHat 7.3. I'm connecting to a postgres 7.3.2 database (running on the same machine) using the JDBC2 drivers. 1Gb of ram, with a decent processor. I'm using the default struts database connection stuff. Here's the struts DB config:



<data-sources> <data-source autoCommit="true" description="PostresQL Connection" driverClass="org.postgresql.Driver" maxCount="100" minCount="10" password="passwd" url="jdbc:postgresql://localhost/mydb" user="dbuser"> </data-source> </data-sources>

I "inherited" this application with no documentation, and I'm kinda new to struts. I've been doing well working on the app, as struts is KINDA straightforward. Now I'm tasked with moving the app from a shared sun box to this linux server. It seems that I'm having problems with my database connection.

Things start off okay, with about 10 postgres processes taking up around 8 Megs each. After about an hour, the postgres processes have grown to like 70 or 80 Mb each. If I let it run longer, they get up to around 200Mb, most of which is allocated out of the shared memory space, but still, it gets slow and kinda clunky. If I reload (or restart, of course) tomcat, the postgres sizes drop back down to 10 Mb. This leads me to believe that I'm somehow leaking DB connections. Reloading tomcat doesn't seem to affect the memory size of tomcat, but its not really getting that big anyway, so I'm less worried about that. I've checked over the code, and I'm closing and setting to null all my ResultSet's, Statements and Connections. I'm POSITIVE that I'm not leaving connections open in my java source.

I've been unable to find on the net a good document explaining how to make sure that the struts DB stuff is using a pooled connection. Should I switch to another pooling mechanism? Can anyone recommend one? Does my struts db config look correct? Has anyone set this up before in a similar environment? Any thoughts or comments would be greatly appreciated! Thanks!

/kurt


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to