Jul 5 2010
WordPress 3.0 Out of Memory?

Have you experienced the dreaded Internal Server Errors with WordPress and have received little to now help from your hosting company?

It makes me crazy when you have a hosting account and something somewhere changes, you as the site owner changed nothing, so it’s either the software mysteriously changing something or the hosting company making adjustments and breaking things, like how much memory you are allowed or reseting files or possibly your files become corrupt.

WordPress 3.0 has been pretty stable with the exception of this past Saturday when all of a sudden my permalinks stopped working properly.

I would receive an error:
———————————————————
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@victorcaballero.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

——————————————————————————–

Apache/2.0.54 Server at victorcaballero.com Port 80
——————————————————

So is this a WordPress controlled error? This error would appear when I clicked on a blog posting or when you would do a search on google and land on one of my blog postings.

Anyway, my first call was to the hosting company MediaTemple, the first response was they are not able to replicate the error. Hmm

So then after a few back and forths I decided to call.

This was the error in the error log:

Checking that error_log, I can see the following errors:

[Sun Jul 04 07:08:40 2010] [error] [client 98.148.173.30] Allowed memory size of 16777216 bytes exhausted (tried to allocate 1 bytes), referer: https://codexbd.xyz/test/tag/robinsons-may-gift-card/
[Sun Jul 04 07:08:40 2010] [error] [client 98.148.173.30] Premature end of script headers: php4, referer: https://codexbd.xyz/test/tag/robinsons-may-gift-card/

You may want to increase the memory_limit in the php.ini file:

https://kb.mediatemple.net/questions/137

More information about that limit can be found on the php website:

https://us3.php.net/manual/en/ini.core.php#ini.memory-limit

If you have any further questions regarding your (mt) Media Temple servers, please let us know.

So apparently it was memory related, but why all of a sudden is my WordPress config requiring more memory than 12 hours prior?

So I asked Media Temple if they had changed anything, and this is what I got:
I’m not showing any changes, but since this is a WordPress blog, certain things will happen over time (via the WordPress cron jobs) and may accumulate extra data that needs to be displayed on the page. This is especially true if you have any plugins that retrieve information from other sites (i.e. advertising or any sort of banner system).

If you have any further questions regarding your (mt) Media Temple servers, please let us know.

and
Thank you for the phone call. Here is a brief summary of our conversation:

You called to see if you could get some additional assistance with this. As a courtesy, I changed the version of php that your site is using to version 5. I also increased the memory limit to 50M (since I did not notice the actual changes in the php.ini file).

Once I did that, I was no longer receiving an internal server error, but rather a 404 error. This would indicate an issue with WordPress somewhere and unfortunately, I am unable to troubleshoot this issue as it falls outside of our scope of support:

https://mediatemple.net/support/statement.php#gs

I would suggest seeking additional assistance from the WordPress support site:

https://wordpress.org/support/

If you have any further questions regarding your (mt) Media Temple servers, please let us know.

——
seems reasonable, but that is pretty much where they stopped. I guess at least they didn’t just throw it back at me and say sorry it’s your hosting account, some other companies, BlueHost in particular after they got hacked, pointed the finger at clients for being responsible for their problems on the hosting accounts.

Anyway, so while all this is going on I am making adjustments to my setup at MediaTemple, allocating more memory, modifying my files:
php.ini
added:
memory_limit = 64M;

.htaccess rebuilt and added and now it looks like this:

AddHandler php5-script php
# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

AddType x-mapp-php5 .php

AddHandler php5-script .php

php_value memory_limit 64M

wp-config.ini:
added this as the second line:
define(‘WP_MEMORY_LIMIT’, ’64M’);

Somehow all of those changed got the permalinks working again and the site responding properly.

I want to thank the sites I visited many that I cannot remember but will include a link here if you would like. Most of them had some portion of the solution. Not sure why in my case I needed to make all the changes for the site to work properly.

The site is up and I thank everyone for their help.

One thing is that there does seem to be some issues with the way WordPress manages memory, especially with plug-ins, so use caution.

Share

Written by

View all posts by: