Prestashop: Out of Memory (allocated ...) in ../../../classes/Configuration.php - php

Prestashop suddenly gives an http 500 error. I turned on error log and got this:
"Fatal error: Out of memory (allocated 709623808) (tried to allocate
130968 bytes) in
/var/www/vhosts/44/252639/webspace/httpdocs/shop.mywebsite.com/classes/Configuration.php
on line 206".
I double checked the Configuration.php on line 206 and it's just a standard prestashop file, nothing weird in it. After all it's an "Out of memory" error so maybe I should increase memory.
phpinfo() shows memory_limit 1024M, which is already pretty much, but maybe I should try 2048M. I tried to create a new custom php.ini but that did not work, because (according to phpinfo) the loaded ini file is searched in this directory: /opt/alt/php56/etc.
My hosting provider does not allow me to edit it, it's read only.
What could I do to solve the problem ?
I did not make a backup yet.

I fixed it. It had nothing to do with not having enough memory or whatever. Someone created a product and that caused errors, I don't know what exactly but for everyone in the future:
Create a backup
Turn off third party modules
Delete all products
Delete cache
etc etc. until your webpage loads correctly again ->
after that, restore your backup and just delete what caused the error.
Hope it will work.

Related

Fatal Error PHP won't seem to go away [duplicate]

I'm getting an error when I try to open one of my dashboard pages in my wordpress script
The error message is as follows:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried
to allocate 71 bytes) in
/home/admin/domains/filesick.com/public_html/wp-includes/taxonomy.php
on line 2685
I asked around and was told I have to increase the memory_limit to something higher than 256M, so I changed it to 512M and still the same problem. Then I changed it to 3024M and this is what I have now, but that didn't fix the problem.
So could you please tell me how to fix this and what should I do?
Waiting for your response.
WordPress overrides PHP's memory limit to 256M, with the assumption that whatever it was set to before is going to be too low to render the dashboard. You can override this by defining WP_MAX_MEMORY_LIMIT in wp-config.php:
define( 'WP_MAX_MEMORY_LIMIT' , '512M' );
I agree with DanFromGermany, 256M is really a lot of memory for rendering a dashboard page. Changing the memory limit is really putting a bandage on the problem.
I had this problem. I searched the internet, took all advices, changes configurations, but the problem is still there. Finally with the help of the server administrator, he found that the problem lies in MySQL database column definition. one of the columns in the a table was assigned to 'Longtext' which leads to allocate 4,294,967,295 bites of memory. It seems working OK if you don't use MySqli prepare statement, but once you use prepare statement, it tries to allocate that amount of memory. I changed the column type to Mediumtext which needs 16,777,215 bites of memory space. The problem is gone. Hope this help.
I changed the memory limit from .htaccess and this problem got resolved.
I was trying to scan my website from one of the antivirus plugin and there I was getting this problem. I increased memory by pasting this in my .htaccess file in Wordpress folder:
php_value memory_limit 512M
After scan was over, I removed this line to make the size as it was before.

Fatal error in WordPress, "Allowed memory size of X bytes exhausted"

I am a WordPress beginner and I have only rudimentary knowledge about CSS and HTML. I have built a WordPress blog in the last days, and it was working well. But since two days I couldn't login and couldn't open the page (but I haven't touch the page since about one week, I don't know what happened). This is what was shown:
Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 30720 bytes) in /home/u0087038969/public_html/wp-admin/includes/deprecated.php on line 533
I suggested that one of the installed plugins caused this trouble. That's why I changed the name of the plugin file via FileZilla, so that I get access to WordPress again. Then I tried to reactivate the plugins gradually to find the trouble-maker. Still it's not really working. What can I do to go about solving the problem?
p.s. I used the following wp plugins: mail poet, all in one seo and contact form 7.
The problem is your installation is requiring more memory than you have available for your site. If you are using a shared hosting environment, you might be at a loss in increasing your memory allotment.
Try updating your wp-config file:
define('WP_MEMORY_LIMIT', '256MB');
If you can change your PHP.ini file you can adjust this:
php_value memory_limit 256MB
Your host seems to have this set incredibly low if it's giving you a memory error at 50MB.

Laravel Memory: 'out of memory (allocated 262144)'

I'm a system administrator which handles a server that hosts an internal api created using Laravel 5. The data source is a SQL Server hosted on another server and the api is used in a IOS app for mobile phones. When the developers created the api, this error was not present and no other memory errors were found. When we went live this error has been popping up from time to time.
[2015-06-01 23:01:52] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Out of memory (allocated 262144) (tried to allocate 140189808036120 bytes)' in Unknown:0
I checked RAM, CPU, swap etc etc of the server but everything was ok. Not much of the resources are being consumed. I've checked PHP Memory limit from php.ini and is set to -1 which is the max according to PHP. I've checked it on CLI, phpinfo.php and httpd.conf I don't see anything wrong. The team tried following this link Allowed memory size of X bytes exhausted
This is a problem in the ios app because the app searches for a correct return code but when this error comes out, even if the ios app transaction is correct, it returns an error because the return code is incorrect as it is returning the code for the memory error.
The first thing I could think of was to restart the Apache httpd service. This immediately solved the issue. but I knew this is not a permanent fix for the issue. When I researched further, I got to know that the error comes when certain PHP scripts require more memory than PHP was allowed by default.
So the solution is to increase the memory allocated for PHP. How to do that? There are 4 possible ways –
Try looking for the php.ini file. You might find some redundant php.ini files, so make sure you have got the one which is actually being read by PHP. o be sure, create a new php file in your root folder, say “check.php” and have phpInfo(); within the php open and close tags. Execute this file to get the information on where the php.ini is residing. Normally it will be in /usr/local/lib/php.ini
Open the php.ini file in a text editor like TextPad (not in Notepad) and change the values for memory_limit. By default you should see memory_limit = 8M. Try changing it to 12M. If it doesn’t work, increase it to 16M or even 24M and so on.
In case you can’t find the php.ini file or do not have access to it, then open up the file which was throwing the error (admin.php in my case) and add a line below just after ini_set(’memory_limit’, ‘12M’);
You can even consider adding a line in .htaccess file which will resolve the issue.
php_value memory_limit 32M
Or else, Try adding this line to your php file:
Increasing memory allocated to PHP
ini_set(“memory_limit”,”16M“);

Wordpress Dies When trying to edit the homepage

The problem is very very weird. Let me explain a little bit better - We have a multi site built for the client. Until recently we could edit the homepage with no issues. In the meantime we have upgraded the core (it was still working with new core). Just recently whenever I try to edit the homepage I get this error
Fatal error: Out of memory (allocated 42467328) (tried to allocate 64 bytes) in /home/officete/public_html/wp-includes/wp-db.php on line 1557
Ok so the apparent solution was to change the php memory allowance... Well I have increased it on the server via WHM, increased it in htaccess, wp-config and php.ini file to over 1.2GB (never really expected I will have to increase it so much) just for testing reasons. Every time I try to edit the page I get the same god damn error and 42467328 allocation limit doesn't change at all the " 64 bytes" part does though and its between 32-128 bytes so far.
I am stumped. And have no idea what else I can do. I did contact the server provider they say it looks ok from their end.
I am assuming its the amount of data that is being collected it does contain few ACF repeater fields (15 of them... I know... But I haven't built it). I did disable all the plugins the error persists (I know that disabling them don't really change what is being pulled from db).
BTW The line 1557 is the return result function that returns the query in an array.
you page need more execution time.add below code into config file and try:
define('WP_MEMORY_LIMIT', '128M');

wordpress Fatal error: Out of memory

I have set php memory limit from whm to 256M from WHM > PHP Configuration Editor.
Even so, my wordpress website and admin is showing me an error like below.
Fatal error: Out of memory (allocated 36175872) (tried to allocate 30720 bytes) in /home/XXXX/public_html/wp-includes/class-simplepie.php on line 14272
Fatal error: Out of memory (allocated 35127296) (tried to allocate 1966080 bytes) in /home/XXXX/public_html/wp-includes/class-simplepie.php on line 5427
I also tried to add following line to the top of wp-config.php, but no luck and same error.
define('WP_MEMORY_LIMIT', '128M');
can anyone suggest me or tell me what may be the solution?
I finally think I've solved the White Screen of Death from PHP out of memory Fatal Errors.
Full details here: http://www.isthisyourhomework.com/how-to-fix-the-wordpress-white-screen-of-death/
If setting the WordPress and PHP memory limits doesn't work for you, try adding/edditing the following line in either your Apache conf files. I didn't have access to those, so I added the following line to the .htaccess file in my WP server's document root:
RLimitMEM max
Many hosts have set limits on each user on shared-use servers. The above setting will unfetter your server and banish the WSOD.
The SimplePie people reckon that this is caused by a bug in PHP. It was fixed in PHP version 5.3. Upgrading might help.
Newer versions of SimplePie use less memory but still suffer from the same PHP bug that causes lots of cached items to cause you to use loads of memory.
Did you change the memory limit in php.ini(or through WHM service configuration page)? If so, try rebooting Apache

Categories