Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /home1/../../../../../database/drivers/mysql/mysql_result.php on line 196
Sol 1:
Sol 2:
Sol 3:
Sol 1:
ContentMiddleAd
ini_set('memory_limit', '-1');
overrides the default PHP memory limit.Sol 2:
ContentMiddleAd
People, changing the memory_limit by
ini_set('memory_limit', '-1');
is NOT a solution at all.
Please don't do that. Obviously php has a memory leak somewhere and you are telling the server to just use all the memory that it wants. The problem has not been fixed at all. If you monitor your server, you will see that it is now probably using up most of the RAM and even swapping to disk.
You should probably try to track down the exact bug in your code and fix it.
ContentMiddleAd
The correct way is to edit your
php.ini
file. Edit memory_limit
to your desire value.
As from your question,
128M
(which is the default limit) has been exceeded, so there is something seriously wrong with your code as it should not take that much.
If you know why it takes that much and you want to allow it set
memory_limit = 512M
or higher and you should be good.
Sol 4:
In Drupal 7, you can modify the memory limit in the settings.php file located in your sites/default folder. Around line 260, you'll see this:
ContentMiddleAd
ini_set('memory_limit', '128M');
Even if your php.ini settings are high enough, you won't be able to consume more than 128MB if this isn't set in your Drupal settings.php file.
No comments:
Post a Comment