nadeemshafi9 Posted April 27, 2007 Share Posted April 27, 2007 Hello guys i am building an application using alot of AJAX used in single calls to PHP files and timouted called to PHP files eg every 1 or 3 seconds to get recordsets etc. My problem is the i am wasting alot of memory, i dont know if its normal but in the space of 15 minuits its used 50 MB on 1 page, it does not crash the server thogh, it seems to be increasing about 1MB per 30 seconds it hasent caused a crash as of yet but i am worried. i have used mysql_free_result($result); should i be freing every thing on the PHP adapter page called repeatedly ? what should i look in to freeing and can mysql_free_result(); work on all variables ? or just the SQL query result arrays ? thanks for any help Quote Link to comment https://forums.phpfreaks.com/topic/48865-garbage-collection/ Share on other sites More sharing options...
taith Posted April 27, 2007 Share Posted April 27, 2007 no... mysql_free_result(); only works on querys... unset($var1,$var2); works on variables... is the memory leaks coming from your php? of from the javascript...? javacript leaks are FAR more common... Quote Link to comment https://forums.phpfreaks.com/topic/48865-garbage-collection/#findComment-239497 Share on other sites More sharing options...
nadeemshafi9 Posted May 11, 2007 Author Share Posted May 11, 2007 its weird, i uploaded it to the linux box and when accessing it remotley it seems to not build any mem on my comp so its not java, and looking at the box throgh the shell the memory on that is ok, but on my windows box it starts going crazy. I think it is the javascript leak, i am calling the script every 3 seconds and another every 1 second and they basicaly replace an element in the ppage with results from the php file. Quote Link to comment https://forums.phpfreaks.com/topic/48865-garbage-collection/#findComment-250344 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.