Page 1 of 1
Fatal Error Allowed Memory Size
Posted: Thu Feb 11, 2021 7:16 am
by Bolaibrahim06
Hello, everyone, I have been using opencart 2.3 for a while now with no major issues but today I tried to
install the Import/export module and I started receiving this Fatal error message on my website which has refused to load since then.
Below is the error I'm receiving.
Code: Select all
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /home/kadamall/public_html/system/library/db/mysqli.php on line 7
Re: Fatal Error Allowed Memory Size
Posted: Thu Feb 11, 2021 8:47 pm
by xxvirusxx
Edit php.ini and change memory limit to 128 or 256M
Re: Fatal Error Allowed Memory Size
Posted: Fri Feb 12, 2021 5:05 am
by Bolaibrahim06
I have changed the PHP.in memory limit on both the admin and main form 256 to 512 and still I get the same error.
Re: Fatal Error Allowed Memory Size
Posted: Fri Feb 12, 2021 7:35 am
by Cue4cheap
What is the full version of OC?
Do you have vqmod installed?
Look into your files and look for a very large one. I am guessing in your storage folder.
Mike
Re: Fatal Error Allowed Memory Size
Posted: Fri Feb 12, 2021 6:00 pm
by Bolaibrahim06
so i have also checked the storage folder and I didn't find any large files in there. just to give more perspective here is the line the error is pointing to.
" $this->connection = new mysqli($hostname, $username, $password, $database, $port); "
I don't know if anyone has experienced this before.
Re: Fatal Error Allowed Memory Size
Posted: Fri Feb 12, 2021 6:38 pm
by JNeuhoff
Do the Export/Import in smaller batches, no more than a few thousand products at a time.
Re: Fatal Error Allowed Memory Size
Posted: Fri Feb 12, 2021 8:43 pm
by Bolaibrahim06
I'm not trying to export or import, I just wanted to install the Module and that happened. meanwhile with respect to the line I posted which the error was pointing to I found out that the is a (\) in form of the MySQL on the main file for Opencart 2.3.0.2 so when I put the (\) my website came back on.
$this->connection = new mysqli($hostname, $username, $password, $database, $port);
and
$this->connection = new \mysqli($hostname, $username, $password, $database, $port);
but some other errors began to show up. please anyone that can help should visit
https://www.kadamall.com.ng/ to view these errors. thanks
Re: Fatal Error Allowed Memory Size
Posted: Fri Feb 12, 2021 8:54 pm
by straightlight
Bolaibrahim06 wrote: ↑Fri Feb 12, 2021 8:43 pm
I'm not trying to export or import, I just wanted to install the Module and that happened. meanwhile with respect to the line I posted which the error was pointing to I found out that the is a (\) in form of the MySQL on the main file for Opencart 2.3.0.2 so when I put the (\) my website came back on.
$this->connection = new mysqli($hostname, $username, $password, $database, $port);
and
$this->connection = new \mysqli($hostname, $username, $password, $database, $port);
but
some other errors began to show up. please anyone that can help should visit
https://www.kadamall.com.ng/ to view these errors. thanks
What errors?
Re: Fatal Error Allowed Memory Size
Posted: Sat Feb 13, 2021 6:12 pm
by victorj
First revert db.php back to original.
Error tells that your max men is set to 512mb and It needs a bit more.
Check if there is a .user.ini file and chance max men tot 1024.
If you are on cpanel hosting check if you van set php setting there if so raise memory to 1024mb.
Re: Fatal Error Allowed Memory Size
Posted: Mon Feb 15, 2021 4:00 am
by EvolveWebHosting
Bolaibrahim06 wrote: ↑Thu Feb 11, 2021 7:16 am
Hello, everyone, I have been using opencart 2.3 for a while now with no major issues but today I tried to
install the Import/export module and I started receiving this Fatal error message on my website which has refused to load since then.
Below is the error I'm receiving.
Code: Select all
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /home/kadamall/public_html/system/library/db/mysqli.php on line 7
I'm guessing you're exporting / importing a large file. Correct? You can try editing the php.ini file but it also depends on your hosting environment. Is this shared, VPS, or Dedicated? Might be best to contact your hosting company to verify the current limit and what can be allocated.