Putting a request lifetime on fcgi processes


We have a big rails app (openstreetmap.org) which has memory leaks. It's running with the script/process scripts under lighttpd. What we're doing is restarting (killing) the processes every couple of hours to stop them swapping and using spawner -r to magically restart the threads.

We'd like to restart the threads after 500 requests, or something nicer and not lose the process queue. Has anyone done this or have any advice on the best way?

(Yes, we'd love to have the time to find the leaks but are firefighting right now)


have fun,

SteveC | steve@asklater.com | http://www.asklater.com/steve/