Solved

WordPress, AWS and memory starvation

Posted on 2016-09-08
5
127 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

734 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