Fatal error: Allowed memory

5 posts by 3 authors in: Forums > CMS Builder
Last Post: December 3, 2018   (RSS)

By gversion - November 22, 2018

Hello,

I am running version 3.15.

When I try to view 25 or 50 errors per page at /cmsb/admin.php?menu=_error_log
I receive an error message:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4355432 bytes) in /public/cmsb/lib/viewer_functions.php on line 442

I realise I could maybe increase the memory allowance in php.ini to prevent this but I'd like to know why so much memory is being used in the first place.

Could someone please give me some clues?

Thank you,

Greg

By gregThomas - November 23, 2018

Hey Greg,

I can't be sure without taking a closer look, but I suspect I know the cause of the issue.

When an error is logged in the CMS, it also stores any data that was set in PHP variables when the error happened in the Symbols table field. This is great for debugging the cause of an issue, but also means that the error log records can be very large if you're loading a lot of records, reading the contents of a file, etc, on a particular page that has an error on it. I suspect the issue is that when you display 25 or more records in the error log at once, the system uses over 128MB of memory (this is the memory limit set in the file /lib/init.php) as the error log records are large.

Would it be possible to send an email to support@interactivetools.com with the CMS/FTP login details for the site so I can take a closer look at the issue?

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By gversion - November 24, 2018

Thanks, Greg. I will be in touch.

Regards,

Greg

By Damon - December 3, 2018

Hi,

Just an update for anyone following this thread.

There was a frontend page with around a hundred records that was generating errors This created error records in the Developer Log with each error record containing a large number of error notifications.

Fixing the frontend error stopped a large number of errors from being generated.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/