0
votes

Symfony\Component\Debug\Exception\FatalErrorException: Allowed memory size of 734003200 bytes exhausted (tried to allocate 67108872 bytes) in /var/www/html/ProjectName/vendor/laravel/framework/src/Illuminate/Database/Connection.php:347

I am getting above error. I've tried increasing the max_memory in php.ini.

But still getting the error.

2
When this error occur? - Yashvantsinh Zala
// top of your controller ini_set('max_execution_time', 0); // Also you can increase memory ini_set('memory_limit','2048M'); - Bugfixer
It's worth looking at the code which is causing this, you can increase the limit but this may just hide an existing problem. - Nigel Ren
The error is clear - your script ran out of memory. You should be looking at what code is doing that, and why? Just increasing the memory available to it is not really a solution. - Don't Panic

2 Answers

0
votes

First Edit your max_memory in php.ini than restart your apache2 with this command

service apache2 restart

Hope this will work fine

0
votes

the server was on EC2 instance. first i tried to increase the limit in php.ini file. My EC2 instace was t2.micro with just 1 GB of ram. I resized the EC2 instance to t2.small . also increased memory limit in php.ini. This solved the issue.