Perron Harkins Wrote: > No, if they never use the database they will never create a connection (unless you use connect_on_init).
Thankyou! We are using connect_on_init, so this may explain our problem. What happens if I turn off connect_on_init? Do I need to change our code in any way? Or will the connection be made automatically? ----- Original Message ----- From: "Perrin Harkins" <[EMAIL PROTECTED]> To: "John Cameron" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, October 18, 2002 4:05 PM Subject: Re: Do all apache childs create persistant mysql connections? > John Cameron wrote: > > > 2) Does Apache create a new mysql connection/process for EVERY child > > apache process that is spawned? > > > It creates one in each process that uses the database. > > > I assume some apache processes are spawned to handle simple > > non-database actions such as retrieving a graphic or static html file. > > Because we're using Apache::DBI, does this mean that even these little > > processes are creating a big mysql process? > > > No, if they never use the database they will never create a connection > (unless you use connect_on_init). Of course you have no way of keeping > the static file requests to a single process, so it's likely that each > process is serving some static files and some dynamic requests that > require database handles. > > > This is bringing us to our knees. Any help or comments, no matter how > > obscure, would be greatly appriciated! > > > Use a reverse proxy as described in the mod_perl documentation to keep > static requests from tying up database connections. Use the MaxClients > setting to liit the total number of apache children, and thus the total > number of MySQL connections. Make sure you are always using the exact > same connection info, or you could be opening multiple database > connections per child. > > - Perrin >