exhausted memory

490 views
Skip to first unread message

Allan

unread,
Feb 28, 2012, 11:57:26 PM2/28/12
to ApiGen
I tried to generate ZF2 api docs but received the following out of
memory message at the command prompt in windows xp:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
to allocate
35 bytes) in C:\wamp\bin\php\php5.3.3\apigen\libs\TokenReflection
\TokenReflecti
on\Stream\StreamBase.php on line 107
exception 'Nette\FatalErrorException' with message 'Allowed memory
size of 13421
7728 bytes exhausted (tried to allocate 35 bytes)' in C:\wamp\bin\php
\php5.3.3\a
pigen\libs\TokenReflection\TokenReflection\Stream\StreamBase.php:107
Stack trace:
#0 [internal function]: Nette\Diagnostics\Debugger::_shutdownHandler()
#1 {main}



Php.ini has memory limit set at 300MB.

How can I increase the allowed memory size? Xdebug was disabled.

Thankyou

Jan Dolecek

unread,
Feb 29, 2012, 1:23:27 AM2/29/12
to api...@googlegroups.com, ApiGen
Hi Allan,

First please double check that the correct php.ini file is loaded (php.exe --ini), because the error reports limit of size 128MB. perhaps another php.ini is being loaded for cli scipts?

Or, if you want to explicitly define memory limit only for one execution, you can use -d option of php:
php.exe -dmemory_limit=512M apigen.php ....

When I was building ZF2 on my hosting with old version of PHP, it needed about 600MB of memory.

Good luck
Jan

Sent from my iPad

> --
> You received this message because you are subscribed to the Google
> Groups "ApiGen" group.
> To post to this group, send email to api...@googlegroups.com
> To unsubscribe from this group, send email to
> apigen+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/apigen
> For more about ApiGen, visit http://apigen.org

kukulich

unread,
Feb 29, 2012, 2:32:17 AM2/29/12
to ApiGen
Hi,

was Xdebug only disabled? It's better if Xdebug is not even loaded.

Cheers

Allan

unread,
Mar 1, 2012, 4:57:55 AM3/1/12
to ApiGen
Thankyou Jan

I was probably using the wrong php.ini file and not the cli php.exe
ini file.
I used your command "php.exe -dmemory_limit=512M apigen.php ...." and
all worked fine using 313 MB.

Allan

On Feb 29, 5:23 pm, Jan Dolecek <juzna...@gmail.com> wrote:
> Hi Allan,
>
> First please double check that the correct php.ini file is loaded (php.exe --ini), because the error reports limit of size 128MB. perhaps another php.ini is being loaded for cli scipts?
>
> Or, if you want to explicitly define memory limit only for one execution, you can use -d option of php:
> php.exe -dmemory_limit=512M apigen.php ....
>
> When I was building ZF2 on my hosting with old version of PHP, it needed about 600MB of memory.
>
> Good luck
> Jan
>
> Sent from my iPad
>

Allan

unread,
Mar 1, 2012, 5:01:06 AM3/1/12
to ApiGen
Thanks for the interest . I will make sure Xdebug is not loaded.

Allan

f.gri...@semrush.com

unread,
Dec 9, 2013, 6:58:37 AM12/9/13
to api...@googlegroups.com
Hi guys! I've just faced the same issue. It turned out that it really takes memory_limit somewhere else but the loaded ini... 
so hardcore way is to open Apigen executable (/opt/local/bin/apigen on macoxs) and add ini_set('memory_limit', '***M');
where *** is your average required number.
It works 8)
Reply all
Reply to author
Forward
0 new messages