Hi,

On Fri, Aug 11, 2000 at 11:16:10PM +0400, Vladimir Buyanov wrote:
> I have the following problem with Apache mod_perl and MySQL.
> We have written Web chat server based on: FreeBSD+Apache+mod_perl+MySQL.
> Hardware: 2xPIII 550, 1Gb RAM
> Also there are PostgreSQL and exim for other tasks on that machine.
> We use 2 httpd scheme: one "light" for handling static content (without
> mod_perl) and another one with mod_perl. First uses proxy to pass requests
> to /script directory to mod_perl enabled "heavy" httpd - httpd.modperl.
> I have test program called "Load Emulator" that can send HTTP requests with
> certain rate. I sends 5 requests/sec to chat scripts. First all things are
> good. But suddenly httpd.modperl begin to spawn and reach the maximum number
> of processes that I set - 50. This means that summary memory usage of
> httpd.modperl processes is about 500M!

Fifty seems like a heck of a lot of heavy apaches. Chances are you'd
only hit that number when Bad Things are happening and a number that
high just makes things worse. What happens if you change maxclients 
to ... ten, say?

> Then "heavy" Apache stop to respond to clients - I run my browser and see
> "Proxy Error". When I stop Load Emulator, such situation continue in about a
> 5-10 minutes, then httpd.modperl processes begin to die.
> During this mysqld eats about 5-10% CPU and 140M RAM.

Sounds like your heavy web pages are taking too long to generate.
I'd be inclined to blame any sql in there - find which queries are 
taking too much time and tune them. This is probably best discussed
on a MySQL list, though... :-)

> Attempt to free unreferenced scalar.

Yeah, we get those too. I don't know what they are either. *grin*
Running without perlfreshrestart/graceful-restarts seems to help, 
but this cure is worse than the disease - we just put up with the 
slight memory leaks associated with the occasional graceful restart 
and do a hard restart every week or two. It's only a minor niggle
and someday I'll sort it out!

All the best,
Wesley.

Reply via email to