Jump to content

Blank screen - fatal error (memory size) in blocktopmenu


Recommended Posts

We are running prestashop 1.5.4.1 with a customised version of the default theme.

 

Today after adding some more products the site suddenly went blank (white screen).  We turned on error reporting and received this message

 

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 557221 bytes) in public_html/modules/blocktopmenu/blocktopmenu.php on line 645

 

We looked at the blocktopmenu.php file and line 645 is

 

$this->_menu .= '<a href="'.$category_link.'">'.$category->name.'</a>';
 

Can anyone help us?  We have had to close the shop and we are losing orders.   I presume this module is the horiztonal top menu module which is the standard one (only css changed).  We have version 1.5

 

By the way I have tried to increase the memory limit in the php.ini file (I tried 120M) but it didnt help.  I now get this error message

 

Fatal error: Allowed memory size of 125829120 bytes exhausted (tried to allocate 1204653 bytes) in /home/jennylee/public_html/modules/blocktopmenu/blocktopmenu.php on line 646

 

I understand that there seems to be some code in the module which is using up too much memory.  My colleague was adding more products and may have tried to add some new categories which triggered the problem.  But we only have 3 categories and 65 products so this should not happen.

 

How can I identify the problematic code?  I dont want any future repeats.  Or is there a solid workaround which will prevent future issues?

Edited by spring00 (see edit history)
Link to comment
Share on other sites

We are running prestashop 1.5.4.1 with a customised version of the default theme.

 

Today after adding some more products the site suddenly went blank (white screen).  We turned on error reporting and received this message

 

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 557221 bytes) in public_html/modules/blocktopmenu/blocktopmenu.php on line 645

 

We looked at the blocktopmenu.php file and line 645 is

 

$this->_menu .= '<a href="'.$category_link.'">'.$category->name.'</a>';

 

Can anyone help us?  We have had to close the shop and we are losing orders.

 

Hi, this is a memory limit error. You have to contact your hosting provdier to increase your memory limit size. Right now your limit is set to 64 mbs which is the bare-bones minimum needed to install PrestaShop. You probably will have to increase this amount. Read this blogpost for more information. www.prestashop.com/blog/en/where-is-php-ini-file/

Link to comment
Share on other sites

Thanks for your reply.  I have now increased the memory limit in the php.ini to 256M which produces this fatal error message

 

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 2751780 bytes) in /public_html/modules/blocktopmenu/blocktopmenu.php on line 646

 

Here are my php.ini settings

 

memory_limit = 256M
max_execution_time = 1000;
max_input_time = -1;
post_max_size = 25M;
upload_max_filesize = 25M;
max_input_vars = 10000;
suhosin.get.max_vars = 10000;
suhosin.post.max_vars = 10000;

 

 

It seems to be that there is a fault in the top menu bar module.  Is there anything else I can try to get our site live again?

Link to comment
Share on other sites

Hi Vekia.  Yes my colleague says she was editing the categories.  She has explained what she was doing (just renaming and adding a new one).  Her actions were perfectly reasonable so why did it wreak the site?  I am really at a loss to understand how to repair it and get it live again.

 

 

I've worked out that the problem is the blocktopmenu module.  Simply by disabling it we can view and use our website again.  Is there a repair I can do to this module or am I better off looking for another menu module?  I would rather repair the existing module or do a workaround if possible.

Edited by spring00 (see edit history)
Link to comment
Share on other sites

Has anyone got any ideas why the blocktopmenu module would be using up so much memory?  We are still struggling with this issue.  We have tried other menu modules but they are not as good and create other problems for us.  If anyone can help please let me know.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...