Solved

WordPress, AWS and memory starvation

Posted on 2016-09-08
5
84 Views
Last Modified: 2016-09-12
I needed to upgrade a little WordPress site to an ExtraLarge partition today since httpd was failing to start due to a memory problem. The suggestion by AWS was to run MySQL on a different instance than WordPress. Meanwhile, I need to pay more for that server.

He also said there could be a memory leak in the code.

What kinds of things could cause a memory leak in the WordPress code?

How confident are you the problem will be solved when I decouple the DB from my Web Server?

Thanks.
0
Comment
Question by:newbieweb
  • 2
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
chilternPC earned 250 total points
ID: 41791399
if you have a memory leak in your code then moving the and decoupling things is not going to fix that.

Have you checked or set  the memory limit in your wp-config.php file in the root wordpress folder?

look for 'WP_MEMORY_LIMIT' in the wp-config.php file and either increase it to 64M  or add the line inside the main php tag:
 
define('WP_MEMORY_LIMIT', '64M');

If you still get the error after this change, then please contact your AWS. Most likely, they would have to go in their php.ini file to increase the memory limit for you.
1
 

Author Comment

by:newbieweb
ID: 41791609
A) He suggested a memory leak as a possibility, but is that even possible with WordPress?

B) He suggested the real cause we do not have enough memory is that one server hosts WordPress AND MySQL.

What are the odds it B?
0
 
LVL 12

Assisted Solution

by:William Nettmann
William Nettmann earned 250 total points
ID: 41792864
a) WordPress, or a theme or plugin, could conceivably have a memory leak. The generally accepted approach to find the source of a problem in WordPress is to disable all plugins and revert to a default theme, e.g. Twenty Sixteen, check if the error continues (if it does, WordPress, data, config or environment is the problem) and if not, add back each plugin and theme one at a time to see which one causes the issue.

b) Many WordPress installations run the web server and MySQL on the same server - and often, PostFix, Bind, Dovecote and other services as well. It is unlikely that running the web server (WordPress) and MySQL on the same server is a problem as such.

The most probable solution to your problem, all things being equal, is to allocate more memory to your AWS instance, and yes, pay more for it.
1
 
LVL 28

Assisted Solution

by:chilternPC
chilternPC earned 250 total points
ID: 41793160
did you check the  memory limit in your wp-config.php file in the root wordpress folder?
1
 

Author Closing Comment

by:newbieweb
ID: 41794253
thanks
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses how to create an extensible mechanism for linked drop downs.
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now