FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Memory leak
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Memory leak [message #173800] Thu, 05 May 2011 15:43 Go to next message
newphp is currently offline  newphp
Messages: 2
Registered: May 2011
Karma: 0
Junior Member
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
Re: Memory leak [message #173801 is a reply to message #173800] Thu, 05 May 2011 15:46 Go to previous messageGo to next message
Mr. B-o-B is currently offline  Mr. B-o-B
Messages: 42
Registered: April 2011
Karma: 0
Member
On 5/5/2011 10:43 AM, newphp cried from the depths of the abyss:
> 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

You might want to include your script
Re: Memory leak [message #173802 is a reply to message #173800] Thu, 05 May 2011 15:49 Go to previous messageGo to next message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma: 0
Senior Member
El 05/05/2011 17:43, newphp escribió/wrote:
> 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..!!??

I don't think that a killed process can still show up in the process
list and even allocate more memory... What do you mean exactly with "the
script gets killed"? Do you mean that you close the Firefox tab?


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
Re: Memory leak [message #173803 is a reply to message #173801] Thu, 05 May 2011 15:53 Go to previous messageGo to next message
newphp is currently offline  newphp
Messages: 2
Registered: May 2011
Karma: 0
Junior Member
On May 5, 11:46 am, "Mr. B-o-B" <mr.chew.b...@gmail.com> wrote:
> On 5/5/2011 10:43 AM, newphp cried from the depths of the abyss:
>
>> 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
>
> You might want to include your script

I cannot include the script, but can u guide me with different methods
to check..??
Re: Memory leak [message #173805 is a reply to message #173800] Thu, 05 May 2011 17:09 Go to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
On Thu, 05 May 2011 08:43:23 -0700, newphp wrote:

> 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..!!??

Which process are you checking with top?

Are you sure it's not exceeding some arbitrary execution time?

What's the error message?

Are you running from command line or in a server environment?

Rgds

Denis McMahon
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Verify Paypal transaction for _any_ account?
Next Topic: php license
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 22:23:33 GMT 2024

Total time taken to generate the page: 0.02739 seconds