Fatal error: Allowed memory size exhausted

All your question about php
Post Reply
mister_v
Posts: 167
Joined: Thu Mar 04, 2010 9:19 pm

Fatal error: Allowed memory size exhausted

Post 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 ?

chris
Site Admin
Posts: 170
Joined: Mon Jul 21, 2008 9:52 am

Re: Fatal error: Allowed memory size exhausted

Post 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.

Post Reply