Post by Renecek » Sat Feb 19, 2022 12:58 am

Hello,
we have a problem with opencart 2.3.0.2.

If I open admin - extensions - modifications I get error:
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 362620744 bytes) in /web/admin/controller/extension/modification.php on line 779

in php.ini have 512M memory limit
memory_limit = 512M;

is there any way how to find where is a problem? or which module has a problem?
Thank you.

New member

Posts

Joined
Thu Dec 10, 2015 7:12 pm

Post by tapspeed » Sat Feb 19, 2022 1:24 am

Hello, Please if there are also ini.php file at admin/php.ini check it also and make sure it has good value like you did : 512
it exists in opencart 2302
second: please review last images you uploaded may you upload big ones cause this error.
I finally check cpanel setting (server) to see max php memory_limit value ..
Have nice day ...
Last edited by tapspeed on Tue Feb 22, 2022 2:56 pm, edited 1 time in total.

Opencart Support | Extension Development | Opencart 3 Klarna checkout


New member

Posts

Joined
Wed Feb 02, 2022 1:09 am

Post by paulfeakins » Mon Feb 21, 2022 7:16 pm

Renecek wrote:
Sat Feb 19, 2022 12:58 am
is there any way how to find where is a problem? or which module has a problem?
This has been asked many times on this forum before, please search first before posting.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by halfhope » Tue Feb 22, 2022 11:34 am

Hi

This is a popular issue with ocmod logs in opencart. Ocmod is not cleared and becomes very large. Delete the log manually (system/storage/logs/ocmod.log), or do an remove before each update.

For auto remove before each update, change file admin\controller\marketplace\modification.php
Before (on line 394):

Code: Select all

$ocmod = new Log('ocmod.log');
$ocmod->write(implode("\n", $log));
paste:

Code: Select all

unlink(DIR_LOGS . 'ocmod.log');
After that you will have up-to-date ocmod logs without problems.

Increasing the memory limit is not a solution, but a fight against the consequences.

My FREE extensions in marketplace. [ security | flexibility | speedup ]


User avatar
Active Member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - San Diego

Post by EvolveWebHosting » Tue Mar 01, 2022 10:49 am

halfhope wrote:
Tue Feb 22, 2022 11:34 am

Increasing the memory limit is not a solution, but a fight against the consequences.
Great answer. I see too many people just trying to increase this limit, ultimately crashing the server because it can't handle it. It's always best to figure out the root cause. Generally the memory limit shouldn't need to be much higher than 32M in most cases.

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhosting.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by OSWorX » Wed Mar 02, 2022 2:20 am

EvolveWebHosting wrote:
Tue Mar 01, 2022 10:49 am
halfhope wrote:
Tue Feb 22, 2022 11:34 am

Increasing the memory limit is not a solution, but a fight against the consequences.
Great answer. I see too many people just trying to increase this limit, ultimately crashing the server because it can't handle it. It's always best to figure out the root cause. Generally the memory limit shouldn't need to be much higher than 32M in most cases.
Well, in some rare cases it could be increased to 48M or 64M.
It's funny because of what reasons some people are increasing this limit .. sad that too many noobs can operate a server!

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by tapspeed » Wed Mar 02, 2022 3:23 am

Hey Friends, I will take care about your answers related to memory limit.

Opencart Support | Extension Development | Opencart 3 Klarna checkout


New member

Posts

Joined
Wed Feb 02, 2022 1:09 am
Who is online

Users browsing this forum: No registered users and 15 guests