Installed Ubuntu 12.04LTS LAMP / Wordpress - Site crashing

Hey, I'm a little new to Wordpress, and have setup a site locally on MAMP that's working fine.

This morning, setup a Linode with the following:

  • Ubuntu 12.04 LTS

  • LAMP

  • APC

  • Fail2Ban

My Wordpress site is pretty simple. Only uses a handful of common modules like ACF, Contact Form 7 and Youst SEO.

The site is doing funky stuff like behaving for awhile, and then all of a sudden the back end AND front end completely tank.

For example, I was just changing the styling of the home page and it all of a sudden lost all the CSS styles, then brought them partially back, and then displayed this:

> Index of /

cgi-bin/

images/

postinfo.html

Apache/2.2.25 (Unix) modssl/2.2.25 OpenSSL/1.0.0-fips modauthpassthrough/2.1 modbwlimited/1.4 FrontPage/5.0.2.2635 Server at http://www.sandiboudreau.com Port 80

The only way I can get the site back up is to reload and restart Apache, but even that doesn't work sometimes.

Really strange.

2 Replies

Theater Eleven,

It looks like you're trying to allocate 256MB of RAM which is too much for Apache, PHP or Wordpress IMHO. It looks like the request is based on the value of the PHP constant WPMAXMEMORYLIMIT. Check your WP install for /wp-includes/default-constants.php. You'll see a check (near line 28) that if WPMAXMEMORYLIMIT isn't defined to set it to 256MB.

I'm not a WP admin but I'm sure that you'll be able to google to find out where the WPMAXMEMORY_LIMIT value is normally defined so it doesn't it the default value. In the mean time you can change the value on the line of default-constants.php to be something more reasonable (I'm not sure what that number would be but it may be 8, 16 or 32MB).

It's generating the error because it can't allocate that much RAM. It may be because of a physical limitation (not enough RAM) or that your server isn't configured to allow a PHP process to use that much RAM.

  • How much free memory do you have? You can check it with 'free -m' (without quotes).

  • What is your 'memory_limit' value set to in php.ini or .htaccess? (mine are set for 32M which is plenty).

MSJ

From WordPress 3.0 admin memory limit was set to 256M.

It is easily configurable: http://codex.wordpress.org/Editing_wp-c … ted_to_PHP">http://codex.wordpress.org/Editingwp-config.php#Increasingmemoryallocatedto_PHP

I would recommend 48M (or 32M if you are sure you have no memory gobbling plugins).

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct