On Wednesday 1 December 2004 08:00 pm, Richard N. Fogle wrote: > Basically, we have one MySQL cluster setup for reads and the other > cluster for writes - the reads cluster alternates between master and > slave. This works fine. The problem we're having is each time the CGI > is called it seems to make a persistent connection to the database > despite the fact that we have a $dbh->disconnect(); at the end of the > code.
Are you running Apache::DBI? If not, are you sure that the disconnect call is being reached on each connection? Are you running under PerlRun, Registry or your own handler? > This causes the application to work well for a period of time, > but it will quickly run the databases out of processes (despite raising > max_connections to 1024+) and when we go into MySQL to look at the > process list it shows a bunch of sleeping connections! How many webserver processes do you have running? > Appreciate any assistance anyone could provide, is mod_perl caching > these scripts That is one of the things mod_perl does. > and making the database connections persistent? That depends on what handler you are using, amongst other things. -- "Let's just say that if complete and utter chaos was lightning, he'd be the sort to stand on a hilltop in a thunderstorm wearing wet copper armour and shouting 'All gods are bastards'." -- Rincewind about Twoflower, The Colour of Magic -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html