vespaman Posted January 31, 2013 Share Posted January 31, 2013 (edited) Help how to fix this fatal erors Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 384 bytes) in /home/public_html/controllers/admin/AdminAttributeGeneratorController.php(72) : runtime-created function on line 1 Edited January 31, 2013 by vespaman (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 31, 2013 Share Posted January 31, 2013 It looks like your server is configured with 256MB of memory allocated to PHP. In your php.ini file, you can increase the memory limit, like so: memory_limit =512M Note that consistently increasing the amount of memory allocated to your application is often the sign of a bigger problem. You might also want a developer to look through the code for any data that is not being properly cleaned up. in my opinion something must be wrong with code. Did you checked error log for more informations? Maybe there you can find where the problem occur Link to comment Share on other sites More sharing options...
vespaman Posted January 31, 2013 Author Share Posted January 31, 2013 i'v put on config.inc.php with this /* Improve PHP configuration to prevent issues */ ini_set('upload_max_filesize', '100M'); ini_set('default_charset', 'utf-8'); ini_set('magic_quotes_runtime', 0); ini_set('memory_limit','256M'); ini_set('max_execution_time', 3600); but always eror when i use attribut generators my prestas1.5.x Link to comment Share on other sites More sharing options...
El Patron Posted January 31, 2013 Share Posted January 31, 2013 just because you set it in your config does not mean that it was honored by your hosting. you should create a phpinfo to display the settings in your server here is a guide: http://kb.mediatemple.net/questions/764/How+can+I+create+a+phpinfo.php+page%3F#gs/create-a-phpinfophp-page Link to comment Share on other sites More sharing options...
vespaman Posted February 1, 2013 Author Share Posted February 1, 2013 this is on my host memory_limit 256M max_execution_time 30 1 Link to comment Share on other sites More sharing options...
El Patron Posted February 1, 2013 Share Posted February 1, 2013 this is on my host memory_limit 256M max_execution_time 30 my bad..I miss read your post.....I'd up it like vekia suggested... Link to comment Share on other sites More sharing options...
vespaman Posted February 1, 2013 Author Share Posted February 1, 2013 how to fix it please help.. always show erorr when i make generator on atribute, sory for my english... Link to comment Share on other sites More sharing options...
El Patron Posted February 1, 2013 Share Posted February 1, 2013 (edited) trying moving increasing another 128 or 256 mb. just to see if that solves it. If not...then you know it's a software issue. what version of 1.5, I will run some searches for similar problem for you in english. Edited February 1, 2013 by elpatron (see edit history) Link to comment Share on other sites More sharing options...
vespaman Posted February 1, 2013 Author Share Posted February 1, 2013 (edited) where i can put them.. @ini_set('memory_limit','256M'); i'v put on config.inc but not solves it http://www.prestashop.com/en/features its also support with to many combinations attribute Edited February 1, 2013 by vespaman (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 1, 2013 Share Posted February 1, 2013 where i can put them.. @ini_set('memory_limit','256M'); i'v put on config.inc but not solves it try this one: echo ini_get("memory_limit")."\n"; ini_set("memory_limit","512M"); echo ini_get("memory_limit")."\n"; That would input this : 256M 512M if you haven't got the same echo values it mean that you haven't access to change this value. Or other thing, you've got suhosin? If so, try to change suhosin.memory_limit value btw. have you got an access to php.ini file? Link to comment Share on other sites More sharing options...
El Patron Posted February 1, 2013 Share Posted February 1, 2013 it's best to change your memory limit and runtime limits in the php.ini I am doing some searches, they all say increase memory...but here are some other links that might help to change within prestashop there is this post; http://www.prestashop.com/forums/index.php?/topic/220875-help-fatal-error-memory-limit/page__view__findpost__p__1090084 also: read this http://www.prestashop.com/forums/index.php?/topic/163597-solved-issue-for-large-attributes-stores/page__view__findpost__p__797665 Link to comment Share on other sites More sharing options...
El Patron Posted February 1, 2013 Share Posted February 1, 2013 try this one: echo ini_get("memory_limit")."\n"; ini_set("memory_limit","512M"); echo ini_get("memory_limit")."\n"; That would input this : 256M 512M if you haven't got the same echo values it mean that you haven't access to change this value. Or other thing, you've got suhosin? If so, try to change suhosin.memory_limit value btw. have you got an access to php.ini file? where to put this you think? config/defines.inc.php? the post link I put in above indicated config/settings.inc.php but I think that is wrong as defines get's loaded first by config Link to comment Share on other sites More sharing options...
vekia Posted February 1, 2013 Share Posted February 1, 2013 where to put this you think? config/defines.inc.php? the post link I put in above indicated config/settings.inc.php but I think that is wrong as defines get's loaded first by config he can insert it in index.php file located in root directory of his prestashop store. Right before the php code require(dirname(__FILE__).'/config/config.inc.php'); i tested it a min ago and it works. But to be honest - in my opinion he hasn't got access to change ini values of his php configuration... So the only way to fix it is to: 1) debug php script (error log) 2) contact with hosting provider to increase memory limit value Link to comment Share on other sites More sharing options...
vespaman Posted February 1, 2013 Author Share Posted February 1, 2013 (edited) i can't see php.ini on my root folder... but my host is also support with costum config... Edited February 1, 2013 by vespaman (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 1, 2013 Share Posted February 1, 2013 did you tried to add code that i pasted above? Link to comment Share on other sites More sharing options...
El Patron Posted February 1, 2013 Share Posted February 1, 2013 he can insert it in index.php file located in root directory of his prestashop store. Right before the php code require(dirname(__FILE__).'/config/config.inc.php'); i tested it a min ago and it works. But to be honest - in my opinion he hasn't got access to change ini values of his php configuration... So the only way to fix it is to: 1) debug php script (error log) 2) contact with hosting provider to increase memory limit value Nice work I agree..call hosting company or use a different attribute module, which there is only one, presto-changeo. Me I am going to bed. Good night and good luck! Link to comment Share on other sites More sharing options...
vespaman Posted February 1, 2013 Author Share Posted February 1, 2013 (edited) Warning: Cannot modify header information - headers already sent by (output started at /public_html/config/config.inc.php:31) in /public_html/classes/Cookie.php on line 317 Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 82 bytes) in /public_html/classes/db/DbPDO.php on line 91 Edited February 1, 2013 by vespaman (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 1, 2013 Share Posted February 1, 2013 can you paste here what you exactly got in index.php file? btw php script "tried to allocate 82 bytes" only 82 bytes! what a mess! Link to comment Share on other sites More sharing options...
vespaman Posted February 1, 2013 Author Share Posted February 1, 2013 that showing 256M Link to comment Share on other sites More sharing options...
vekia Posted February 1, 2013 Share Posted February 1, 2013 so, is exactly as elpatron and i said: you haven't got access to edit php.ini values, so the best way is to: 1) try to debug php scripts, check error log for errors which taking up memory resources 2) contact with server administrator and ask for increase memory limit value Link to comment Share on other sites More sharing options...
Online Office USA Posted March 28, 2013 Share Posted March 28, 2013 I have the same error - except I'm only getting 71 bytes! All of my settings are as suggested and "echo" code added to my index.php and I still receive this: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /home3/swmcatal/public_html/swmodularinc/classes/Product.php on line 1027 This is repeated in my error log every day: These options need to match in Unknown on line 0 [26-Mar-2013 14:41:16] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/php/54/usr/lib64/php/modules/mailparse.so' - /usr/php/54/usr/lib64/php/modules/mailparse.so: undefined symbol: zend_new_interned_string in Unknown on line 0 [26-Mar-2013 14:41:16] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/php/54/usr/lib64/php/modules/oauth.so' - /usr/php/54/usr/lib64/php/modules/oauth.so: undefined symbol: zend_new_interned_string in Unknown on line 0 [26-Mar-2013 14:41:16] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/php/54/usr/lib64/php/modules/oci8.so' - /usr/php/54/usr/lib64/php/modules/oci8.so: undefined symbol: zend_new_interned_string in Unknown on line 0 [26-Mar-2013 14:41:16] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/php/54/usr/lib64/php/modules/uploadprogress.so' - /usr/php/54/usr/lib64/php/modules/uploadprogress.so: undefined symbol: zend_ini_string_ex in Unknown on line 0 [26-Mar-2013 23:18:30] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/php/54/usr/lib64/php/modules/http.so' - /usr/php/54/usr/lib64/php/modules/http.so: undefined symbol: zend_new_interned_string in Unknown on line 0 [26-Mar-2013 23:18:30] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/php/54/usr/lib64/php/modules/imagick.so' - /usr/php/54/usr/lib64/php/modules/imagick.so: undefined symbol: zend_new_interned_string in Unknown on line 0 [26-Mar-2013 23:18:30] PHP Warning: PHP Startup: magickwand: Unable to initialize module Module compiled with module API=20100525, debug=0, thread-safety=0 PHP compiled with module API=20060613, debug=0, thread-safety=0 Link to comment Share on other sites More sharing options...
Northman Posted March 28, 2013 Share Posted March 28, 2013 Hello I got this error today because i typed by mistake $this->renderForm() in my own controller renderForm() method, instead of parent::renderForm(), so i got infinite loop. Maybe you have the same kind of error using a displayForm or any method displaying content? Link to comment Share on other sites More sharing options...
Online Office USA Posted March 28, 2013 Share Posted March 28, 2013 Well my solution wasn't so deep. I simply have a product that generates more combinations then it seems PS can handle... This is simply unacceptable. I have products that feature several attributes and values. How does one fix this? Link to comment Share on other sites More sharing options...
toninovak66 Posted April 7, 2013 Share Posted April 7, 2013 It seems as if you can't fix it using the standard PS. You have to buy a module to properly handle all the combinations that PS generates. It seems really silly to handle attributes the way PS currently does. Very poorly constructed. It causes errors and runs out of memory. I have a site I'm developing and every products has a color and size option. My site is totally down now and we only have about 2,400 products. Not good. Link to comment Share on other sites More sharing options...
jojo89 Posted May 12, 2015 Share Posted May 12, 2015 (edited) Hi everyone, i have the same problem when i try to export orders (prestashop 1.6.0.13) Fatal error : Allowed memory size of 4294967296 bytes exhausted (tried to allocate 72 bytes) in www/tools/profiling/ObjectModel.php and when i try to export customer i have "page not found" error any suggestion ? Thank u Edit : i try this ini_set('memory_limit', '-1'); and it's work but i have a empty csv file :s Edited May 12, 2015 by jojo89 (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted May 12, 2015 Share Posted May 12, 2015 Are you kidding? 4294967296 bytes is exactly 4G. Does your export script need 4G of memory? Link to comment Share on other sites More sharing options...
Northman Posted May 12, 2015 Share Posted May 12, 2015 You should try de-activate cache, not smarty cache, but APC/Memcache/CacheFS/Xcache which is the last options in Advanced parameters > Performance Link to comment Share on other sites More sharing options...
jojo89 Posted May 12, 2015 Share Posted May 12, 2015 (edited) Hi Thanks you for yours answers For Tuk66 => no i'm not kidding, this is a huge export, i mean like 200,000 customers, when I add a filter for customers list and then i can export for exemple 26 000 customers but to export all it's not possible :s result is an empty csv file :s or a page not found ... The samethings for orders export For Northman => I activated the cache, but which option i will chose ? because there is 4 options : file system, memcached, APC and Xcache Thank u everyone Edited May 12, 2015 by jojo89 (see edit history) Link to comment Share on other sites More sharing options...
Northman Posted May 12, 2015 Share Posted May 12, 2015 Have you tried setting it to OFF? I had the same problems when working on table updates with +50.000 records, and setting the sql cache to OFF worked for me. I hope it will work for you. Link to comment Share on other sites More sharing options...
jojo89 Posted May 12, 2015 Share Posted May 12, 2015 it's exactly the same problem that i have.. the cache was disabled by default i activated now and nothing change (but i'm not sur if is the cache that u talk about :s ) if you can just take screenshot for me to be sur, thank u Link to comment Share on other sites More sharing options...
Northman Posted May 12, 2015 Share Posted May 12, 2015 Sorry can't make picture. It is the last cache option at the very bottom of the page, you cannot miss it But if it was already disabled, it may not solve your problem. Alternatively, you can try to export your datas in batches using this condition: if( Tools::getMemoryLimit() < memory_get_peak_usage() ) break; This will stop the program before you get the fatal error. So if you record the last exported ID, you can use it in your sql query and start again the program from this point. Good luck! Link to comment Share on other sites More sharing options...
jojo89 Posted May 12, 2015 Share Posted May 12, 2015 ok so then we talk about the same cache Hum ok this line in which file and fonction i need to added it in ? sorry for all this questions Link to comment Share on other sites More sharing options...
Northman Posted May 12, 2015 Share Posted May 12, 2015 Sorry i can't help much. If you are using a module for export or the native export option in the admin, then it will be in the method doing the export. Link to comment Share on other sites More sharing options...
tuk66 Posted May 13, 2015 Share Posted May 13, 2015 Sorry, I just tried to do it a little lighther. No offense. I think there must be something wrong in that export script. What is it? Module or custom script? To export 26,000 customers must be 128M enough. Link to comment Share on other sites More sharing options...
jojo89 Posted May 15, 2015 Share Posted May 15, 2015 Thank u Northman, thank u tuk66 it's the prestashop native export in the admin not a module, i don't think it's a script problem because like i say when i try to export 26 000 customers or orders it's ok no problem but more than that i have just an csv file empty.. Link to comment Share on other sites More sharing options...
Recommended Posts