in reply to any way to control a memory leak

Hmm, odd that this script has to run 7/24 -- couldn't you get the same effect by running it every ten or fifteen minutes, and have it do a couple of sleep ( 60 ); inside the code?

As a way of testing out your problem, I would duplicate the script and comment out some of the database code (and run it against a copy of production), just to see where this memory loss is occurring.

--t. alex

"Of course, you realize that this means war." -- Bugs Bunny.