My include scripts that is used to dispay ads on a site with lots of pages, is eating and eating my memory till the server crashes..
Right now I have mysql_free_result in place and unset on most variables in the script (which fetches urls from a database and selects a banner from a directory of banners).
But memory shrinks like hell.. My apache processes are upwards 8mb in size, and thats kinda big for just normal processes (It usually crashes when memory is eaten and I'm at around 200 sleeping processes)...
I wish there was some kind of method that told PHP to clean up everything after a file/script has been run.. I see no point really in keeping such large quanties of data in the memory on normal pages..
Any tips?
regards,
-Morten-