Jump to content

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 384 bytes) in /home


Recommended Posts

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

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

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

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

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

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

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

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 by vespaman (see edit history)
Link to comment
Share on other sites

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

  • 1 month later...

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

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

  • 2 weeks later...

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

  • 2 years later...

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 by jojo89 (see edit history)
Link to comment
Share on other sites

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 by jojo89 (see edit history)
Link to comment
Share on other sites

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

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

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

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

×
×
  • Create New...