Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Memory leak
#1
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
Reply
#2
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.... ;)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [HOWTO] Check memory usage and loading time Gaijin 6 1,396 04-26-2011, 07:17 AM
Last Post: harris21

Forum Jump:


Users browsing this thread: 1 Guest(s)