viktor123 Posted September 30, 2014 Share Posted September 30, 2014 Hi, I have a problem with my site. Since yesterday, customers can't load site.com/order page. It is blank and the bug report says: [29-Sep-2014 14:40:38 Europe/*****] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32 bytes) in /home/********/public_html/classes/db/DbPDO.php on line 101 Hosting company increased the size, but with no effect. It appears there is a script that runs for quite a long time. Problem appeared yesterday. Error log says: [29-Sep-2014 13:33:02 Europe/******] PHP Fatal error: Uncaught exception 'SmartyException' with message 'unable to write file /home/******/public_html/cache/smarty/cache/crossselling/productfooter/2510/2/4/236/f8/5a/34/wrt5429355e123658.72913840' in /home/******/public_html/tools/smarty/sysplugins/smarty_internal_write_file.php:44 Stack trace: #0 /home/******/public_html/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php(102): Smarty_Internal_Write_File::writeFile('/home/******/p...', '<?php /*%%Smart...', Object(Smarty)) #1 /home/******/public_html/tools/smarty/sysplugins/smarty_cacheresource.php(367): Smarty_Internal_CacheResource_File->writeCachedContent(Object(Smarty_Internal_Template), '<?php /*%%Smart...') #2 /home/******/public_html/tools/smarty/sysplugins/smarty_internal_template.php(230): Smarty_Template_Cached->write(Object(Smarty_Internal_Template), '<?php /*%%Smart...') #3 /home/******/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(259): Smarty_Internal_Template->writeCachedContent('?') #4 /home/******/public in /home/******/public_html/tools/smarty/sysplugins/smarty_internal_write_file.php on line 44 [29-Sep-2014 13:42:35 Europe/******] PHP Warning: Invalid argument supplied for foreach() in /home/******/public_html/modules/blocklayered/blocklayered.php on line 2648 [29-Sep-2014 13:42:35 Europe/******] PHP Warning: Invalid argument supplied for foreach() in /home/******/public_html/classes/tax/TaxRulesTaxManager.php on line 97 [29-Sep-2014 13:42:35 Europe/******] PHP Warning: Invalid argument supplied for foreach() in /home/******/public_html/modules/blocklayered/blocklayered.php on line 2658 [29-Sep-2014 13:42:35 Europe/******] PHP Warning: Invalid argument supplied for foreach() in /home/******/public_html/classes/Product.php on line 2651 [29-Sep-2014 13:42:35 Europe/******] PHP Warning: Invalid argument supplied for foreach() in /home/******/public_html/classes/Tab.php on line 271 [29-Sep-2014 13:42:35 Europe/******] PHP Warning: Invalid argument supplied for foreach() in /home/******/public_html/modules/blocklayered/blocklayered.php on line 2658 [29-Sep-2014 13:42:36 Europe/******] PHP Warning: Invalid argument supplied for foreach() in /home/******/public_html/modules/crossselling/crossselling.php on line 212 [29-Sep-2014 13:42:36 Europe/******] PHP Warning: Invalid argument supplied for foreach() in /home/******/public_html/modules/crossselling/crossselling.php on line 235 Help needed! Link to comment Share on other sites More sharing options...
bellini13 Posted September 30, 2014 Share Posted September 30, 2014 Ask your host to increase the maximum memory allocation for each php process. You can refer to this page for additional information. Its a drupal page, but has the information you need to correct the issue https://www.drupal.org/node/207036 Link to comment Share on other sites More sharing options...
viktor123 Posted October 1, 2014 Author Share Posted October 1, 2014 Ask your host to increase the maximum memory allocation for each php process. You can refer to this page for additional information. Its a drupal page, but has the information you need to correct the issue https://www.drupal.org/node/207036 Hi I found the solution. In case someone experiences the same problem, here is what I did: When loading the order page, which is shopping-cart.tpl, it appears that PS checks for discount codes, which in my case was the problem. I had a module installed for FB and G+ discount codes in product pages. The G+ voucher module has been creating 5-6 codes every second, and the tables ps_cart_rule and ps_cart_rule_lang were quite big. I had to delete the module G+ voucher (not just disactivate), but truly delete, and empty the 2 tables above. Just go to phpmyadmin from cpanel and execute the commands: DELETE FROM `***myDB****`.`ps_cart_rule` WHERE `date_add` < 'now' DELETE FROM `****myDB***`.`ps_cart_rule_lang` WHERE 1 where *****myDB***** is the name of your prestashop database name. Since then my shop.com/order page does not load blank file with the msg: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32 bytes) in /home/********/public_html/classes/db/DbPDO.php on line 101 Btw, I had quite big tables ps_connections_source and ps_connectioins, which I emptied them as well, This sped up my site as a whole. Link to comment Share on other sites More sharing options...
Recommended Posts