.------[ Kirk Bowe wrote (2002/10/15 at 20:40:15) ]------ | | I'm using Apache::DBI connecting to a Postgres db. I'm using Template | Toolkit but no explicit db calls from within the templates -- they're all | done within the perl modules. | | Unfortunately after a couple of hours of moderate use Postgres reaches its | max_clients level (which is set below max httpds in httpd.conf) and apache | has to be graceful'd to restore the situation. At this point there's no | work being done, so presumably the handles aren't being freed. I've made | sure that all db calls are fully read, e.g. doing while ($sth->fetch) {..} | routines on all selects so as to avoid leaving results unread. | | Does anyone have any tips on how to, at this point, go about detecting | where the handle leak might be (which I'm presuming is the problem)? Or | should Template::Toolkit be avoided altogether when using mod_perl and | database connectivity? I'm using a 1.3 setup. | `-------------------------------------------------
According to the Apache::DBI readme it seems that each apache child will need one connection to the database, and the child will resuse that connection for each request. Have you turned on debugging in Apache::DBI and watched your Apache error_log for any weirdness? --------------------------------- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org ---------------------------------