prestalike Posted May 9, 2013 Share Posted May 9, 2013 Hi all, I installed prestashop 1.5.3.1 and worked fine for a few weeks. Suddenly the Fatal error occurred. It is only store front, the admin page is no problem. PHP version: 5.3.3 Memory limit: 256M Max execution time: 300 MySQL version: 5.1.67 MySQL engine: InnoDB Prestashop version: 1.5.3.1 error log shows PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 21446148 bytes) in /XXXXXX/modules/blocktopmenu/blocktopmenu.php on line 644 Then I increase Memory limit: from 256M to 512M. But I got another error. The errors are PHP Fatal error: Maximum execution time of 300 seconds exceeded in /XXXXXX/classes/Tools.php on line 982 Maximum execution time of 300 seconds exceeded in /XXXXXX/classes/ObjectModel.php on line 221 PHP Fatal error: Maximum execution time of 300 seconds exceeded in /XXXXXX/classes/Tools.php on line 1044 Does anyone know how to avoid these fatal error? Thank you Link to comment Share on other sites More sharing options...
Andrej Stas Posted May 9, 2013 Share Posted May 9, 2013 Did you install any new module recently? Did you import new products? Try to think about modifications done recently. Link to comment Share on other sites More sharing options...
tomerg3 Posted May 9, 2013 Share Posted May 9, 2013 Nothing should take 300 seconds just when browsing your site (creating a backup, or running a process that talks to a 3rd party API are an exception, but doesn't sound like it's the case.) How many categories do you have? Try to disable your category block, and see if the error is gone? Link to comment Share on other sites More sharing options...
prestalike Posted May 9, 2013 Author Share Posted May 9, 2013 Hi, Andrej Stas Thank you for your reply. I installed theme and modules about one month ago. I did not modify after that. Last week we add 150 products, then the fatal error occured this week. Link to comment Share on other sites More sharing options...
prestalike Posted May 9, 2013 Author Share Posted May 9, 2013 hi, tomerg3 Thank you for your reply. I disabled all categories, then we can browse the store front top page. We have 170 categories and they have 4 levels. It seems that the fatal error occurs after entry the new products. Can the prestashop handle the above categories? Do we have to optimize? Do we need more server spec? Current spec - Intel® Xeon® CPU X3220 @ 2.40GHz, 4 cores - 4GB memory - CentOS Linux 6.2 In addition, Our products are shoes and there are options, such as color, size and width. Link to comment Share on other sites More sharing options...
tomerg3 Posted May 9, 2013 Share Posted May 9, 2013 Disabled categories or the categories module? Try to disable the module, as it looks like it's the culprit. Also, try using the default theme qnd see if the error persists Link to comment Share on other sites More sharing options...
prestalike Posted May 9, 2013 Author Share Posted May 9, 2013 (edited) Hi, tomerg3 I disabled categories. This time I enable the categories and try to disable the module "Top horizontal menu". After that the fatal error did not occur, this module is the culprit. I reconfigure this module and works fine now. Thank you Edited May 9, 2013 by prestalike (see edit history) Link to comment Share on other sites More sharing options...
botmez Posted November 23, 2013 Share Posted November 23, 2013 What is the modification to do ! I have no problem with default theme I have an error with my new theme ! Thanks for the help tomer ! Link to comment Share on other sites More sharing options...
Radu Posted November 23, 2013 Share Posted November 23, 2013 I got the same issue after I install a new theme which I bought (not important the exact one as it will be a negative advertisement) I copied the whole website locally and enabled profiling in php to see the reason. It turned out the new theme had a few modules like topmenu, featured products ... that were very very slow. I don't have the resources to optimize each module so I am thinking cache-ing the module output. Maybe contacting the theme developer will solve the things faster in our case (in case your theme is not free also) Link to comment Share on other sites More sharing options...
vekia Posted November 24, 2013 Share Posted November 24, 2013 What is the modification to do ! I have no problem with default theme I have an error with my new theme ! Thanks for the help tomer ! what kind of error you've got now exactly? Link to comment Share on other sites More sharing options...
tomerg3 Posted November 24, 2013 Share Posted November 24, 2013 If you get Out Of memory error, then you need more memory (your theme may use more). If you get another error, start a new thread, and post it there (Try to search first, as there may already be a similar thread). Link to comment Share on other sites More sharing options...
botmez Posted December 2, 2013 Share Posted December 2, 2013 Hello Here is the error: [PrestaShop] Fatal error in module blocktopmenu: Allowed memory size of 536870912 bytes exhausted (tried to allocate 3586110 bytes) I have 1 GB ram on OVH ! I have disable the categorie block ! How to solve ? Problem occurs in 1.5.6.1 with blockmenu 1.7 / blockmenu 1.6 !!! HELP !!!!! Link to comment Share on other sites More sharing options...
botmez Posted December 2, 2013 Share Posted December 2, 2013 To be more accurate : Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 3586064 bytes) in /homez.314/xxxxxxxxxxx/www/modules/blocktopmenu/blocktopmenu.php on line 650[PrestaShop] Fatal error in module blocktopmenu:Allowed memory size of 536870912 bytes exhausted (tried to allocate 3586064 bytes) Link to comment Share on other sites More sharing options...
tomerg3 Posted December 2, 2013 Share Posted December 2, 2013 How many categories do you have? it seems like the module is trying to cache them or load into memory, and there's simply too many. Link to comment Share on other sites More sharing options...
botmez Posted December 3, 2013 Share Posted December 3, 2013 I have 50 categories but it is not big.... What can I do ? I have install a new theme to test Same probleme: Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 53407 bytes) in /homez.314/xxxxx/www/modules/leobootstrapmenu/libs/Helper.php on line 25[PrestaShop] Fatal error in module Helper:Allowed memory size of 536870912 bytes exhausted (tried to allocate 53407 bytes) On line 25: public static function treeCategory($id, &$list, $children, $tree=""){ if (isset($children[$id])){ if($id != 0){ $tree = $tree." - "; } foreach ($children[$id] as $v) { $v["tree"] = $tree; $list[] = $v; self::treeCategory( $v["id_category"], $list, $children,$tree); } } } Link to comment Share on other sites More sharing options...
Radu Posted December 4, 2013 Share Posted December 4, 2013 @botmez Something else seems wrong, your script is eating 512MB wich is not normal Maybe there is an infinite look or something. With all due respect to leo I have an experience with one of his themes which is very very slow. Maybe it's better to contact him for support Link to comment Share on other sites More sharing options...
botmez Posted December 5, 2013 Share Posted December 5, 2013 cause identified : import CSV mega loop with parent category and sub category I import a parent category which was not created and loop loop loop loop Link to comment Share on other sites More sharing options...
Radu Posted December 6, 2013 Share Posted December 6, 2013 but why the loop though, can you explain in a couple of words where in the code I can look ? Link to comment Share on other sites More sharing options...
Recommended Posts