in reply to Looking for a way to use one database connection with multiple CGI scripts

You don't mention whether it's running under mod_perl or FastCGI, where DBI's FAQ might answer your question (more for mod_perl than FastCGI). If it's really a CGI application that gets executed when requested, and is otherwise not loaded/running, then you'll have to switch to mod_perl or FastCGI or something similar, where your DBI connections can be cached.

Though, I have to admit, I'm a bit confused by your wording. If you don't reuse connections, you never have to worry about timing out - since you'd be creating a new connection each time your CGI code was executed.

  • Comment on Re: Looking for a way to use one database connection with multiple CGI scripts