in reply to Where is my cgi memory leak?

It is a production setup and it is not mod_perl, just plain ol' cgi.

One thing I was thinking about was putting some code at the beginning and end of each script (or rather putting it into a module and calling at the beginning and end) to check memory usage and write to the log if memory usage has increased. But then, I'd need to check memory usage for just that apache thread.

An alternative to taking scripts offline, is to proxy to yet another local apache server process, and move different scripts to the proxy server.