Solved

WordPress, AWS and memory starvation

Posted on 2016-09-08
5
138 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 29

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 29

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
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…
The viewer will learn how to count occurrences of each item in an array.

717 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