Support Forums

Full Version: Memory leak
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When I run a PHP script, the script gets killed , when I check the
memory using the command TOP, this process is taking lot of memory
eventually running out..!!
when i check for memory in the script using memory_get_usage or
memory_get_peak_usage functions its uses around 2mb..!! the script
takes a datalist file, reads each row and executes mysql queries..!!
wat could be the reason..!!??
Thanks
This just sounds as your loop is obviously way too big.
I have a Function which converts Strings of any length to HEX, since the function runs a loop through the string checking each character and converting it, the function uses over 2 MB for smallest texts.

Either try to find an another way to execute that much SQL commands or reduce them.
You could also use Ajax to execute the commands in smaller packs.. Big Grin
Posting the code could show some errors.... ;)