in reply to RE: RE: Re: Apache::Sessions -- Good
in thread Apache::Sessions -- Good, Bad or just Ugly?

OK, I got you.. that makes sense; wouldn't need 10 handles per httpd session. What about scaling there? Say 400 simultaneous instances are created; so we now have 400 reusable handles? And where/when do these get cleaned up, with their parent httpd process? chock full o' q's --ismail
  • Comment on RE: RE: RE: Re: Apache::Sessions -- Good

Replies are listed 'Best First'.
RE: RE: RE: RE: Re: Apache::Sessions -- Good
by lhoward (Vicar) on Oct 24, 2000 at 01:39 UTC
    Now you've wandered into apache performance tuning / DB connections land. I believe (and I'm no expert on this) the DB handles are only torn-down when the httpd process ends. You can set your apache configuration (MinSpareServers, MaxSpareServers, MaxClients, MaxRequestsPerChild etc...) to regulate the # of simultaneous HTTPD processes. If your getting enough hits to handle 400 simultaneous httpd process at peak then maintaining those connections off-peak won't be extra load. However, your DB may drop the client'd DB connection if it had been idle for a while, Apache::DBI is smart enough to detect this and reconnect when called again if it was dumped like this. When tuning apache for maximal performance one typical trick is to have several servers with diffrent configurations running. One to handle all the .cgi's (w/ APache::DBI) and another for images and static content (no Apache::DBI or mod_perl or anything else needed on this one). That way you're not "wasting" connections on servers that aren't connected.