Koozali.org: home of the SME Server

httpd children are swamping my server

Holger

httpd children are swamping my server
« on: September 09, 2002, 01:05:37 PM »
The question:
Is there a way that I can prevent httpd or PHP to not start more than 3 simultaneous 'convert' (ImageMagick) requests?
Or should I make a cron job that kills extra processes (seems a primitive way to do it)?

The issue:
One of the best uses of my e-smith server, is my online photo albums containing pictures of event that I have participated in with family, friends and colleagues.
I am using Yappa (see the howto section) and it is a brilliant PHP.

Yappa scales the pictures the first time they get a hit and saves the scaled pictures for subsequent requests.

But my server gets swamped every time I announce that a new photo section is up. It just 4 or 5 simultaneous requests to pictures that are not yet scaled and all of my 128MB are used. The swapd will go bananas and nothing gets through after that - I can't even make an ssh connection anymore.


Thanks!