Re: pear::HTTP_Request and pear::Net_Socket
| From: | Justin Patrin | Date: | Tue, 18 Apr 2006 03:43:26 +0000 |
| Subject: | Re: pear::HTTP_Request and pear::Net_Socket | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23692@lists.php.net to get a copy of this message | ||
On 4/17/06, Ryan Escarez <ryan.escarez@gmail.com> wrote:
> Hi,
>
> I'm using pear::HTTP_Request and I'm having difficulty gaining memory
> that already used by pear::Net_Socket. I got the following error after
> running my script
>
> <b>Fatal error</b>: Allowed memory size of 8388608 bytes exhausted
> (tried to allocate 4097 bytes) in
> <b>/usr/share/pear/Net/Socket.php</b> on line <b>243</b><br />
> Allowed memory size of 8388608 bytes exhausted (tried to allocate 0 bytes)
>
> Is it possible to free up memory that already used by
> pear::Net_Socket? I've tried checking on how many memory it consumed
> and i found out that after doing a 20,000 pear::HTTP_Request loop, it
> eats almost 8MB of RAM on 50% or 10,000 pear::HTTP_Request loop only
> and the script stop. AFAIK increasing 8MB memory limit is not
> advisable. Any idea or workaround on this?
>
I suggest trying to figure out where the memory leak is. Perhaps you
should try unsetting your variables and see if that helps any. As a
workaround you could always do less requests per script run.
--
Justin Patrin