Tuesday, 3 March 2020

Laravel PHP memory exahusted

It is happened to me with laravel 5.1 on php-7 when I was running bunch of unitests.
The solution was - to change memory_limit in php.ini but it should be correct one. So you need one responsible for server, located there:
/etc/php/7.0/cli/php.ini
so you need a line with
 memory_limit
After that you need to restart php service
sudo service php7.0-fpm restart
to check if it was changed successfully I used command line to run this:
 php -i
php -i | grep "memory_limit"
the report contained following line
memory_limit => 2048M => 2048M

No comments:

Post a comment