0

I have a web application that looks like this:

WEB SERVER (PHP, Apache) -> MYSQL NODE

This works perfectly without any issues, and has done for a long time.

However, when I introduce a load balancer (I have used both HAProxy and ProxySQL, both with the same resulting behaviour) to manage requests to my database cluster, I have some issues with Apache stalling.

The load balancer is installed on the web server alongside apache and accessed via the system's loopback device. To be explicit, the web application makes database calls to 127.0.0.1:3306 and this is where the load balancer listens.

To simplify things, this is my new setup:

[WEB SERVER (PHP, Apache) -> LOAD BALANCER] -> MYSQL NODE

When load becomes heavy, this is what what I see:

PROMPT~] apachectl status ... ... WWWWWWWWWWWWWWWWWRWWRRWWWWWWWWWWWWWRWRWWWWWWWWWWRWWWWWRWWWWWWWWR WWWWWWWWWWWWWWWWWWWWWWWWWWRWWRWWWWWWWWRWWWWWWWWWWCWWWWWRWWWWWWWW WWWWWWWWRWWWWRWRWWRRWWWCWWWRWWWWWWWWRWWWWWWWWWWWWWWRWWWRWWWWWWWW WWWWWWWWWWRWRWWCWWWWWWRRWRWWWWRCWWWWWWWWWWWRWWWWWWWRWRWWWW

The fact that this is occuring with multiple load balancers suggests that the issue is more general and possibly operating system related.

I see no errors reported by Apache, the load balancers or the database.

OS metrics such as CPU and Memory appear to be okay. I do see a spike in the following around the time the issue strikes:

  1. Number of TCP sockets
  2. Number of Apache processes

I feel like I am probably missing something elementery here and would appreciate any advice.

Thanks

2
  • can you share your load balancer setting? I am not sure if load balancer and apache installed in the same server works. but I might be wrong. I never used it that way. Oct 3, 2017 at 20:14
  • the issue occurs with two distinct load balancers -- proxysql and haproxy -- so I'm not sure it is load balancer related. The web application is pointed towards 127.0.0.1:3306, and that is where the load balancer listens. From my understanding, this is a common configuration. Oct 4, 2017 at 9:04

0

You must log in to answer this question.

Browse other questions tagged .