Page 1 of 1

Fatal error: Allowed memory size exhausted

Posted: Sat Sep 08, 2018 11:13 am
by mister_v
Hi,

I run a script in CLI php,
And I get the following error :

Code: Select all

Fatal error: Allowed memory size of x bytes exhausted (tried to allocate x bytes)
What can I do to solve it ?

Re: Fatal error: Allowed memory size exhausted

Posted: Sat Sep 08, 2018 11:22 am
by chris
In the php.ini file (/etc/php/cli-php7.0/php.ini)
you can set the Allowed memory :

Code: Select all

memory_limit=128M
You can increase it to 512M or even more.
But you might want to check why your script uses that much memory.