V
V
Vladimir Merk2014-01-14 18:40:30
MySQL
Vladimir Merk, 2014-01-14 18:40:30

How to overcome LAMP server performance problems?

Hello. There are two powerful physical servers with a bunch of LAMP, on Debian. Features 32Gb ram, Intel Xeon E3-1245 Quadcore, SATA HDD. Apache settings, mysql standard (except for a couple of little things).
On the first one, a dozen self-written sites are spinning, with attendance of about 5-10k per day.
The second is dedicated to a separate site, with more visits. From the second server, the first one is accessing the database several times per second (direct connection).
Periodically, sites do not open. This happens many times a day. The browser tries to load the page, then writes that it is impossible. The second server has the same problems (Perhaps this is related?).
Ping is working fine. As I understand it, it can be either a database or a file system.
I absolutely do not know what to do, where to start and where to dig. How can you find out which site is to blame? Or find out the percentage of resource consumption by each.
If you need more information, I will provide. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
K
Kerman, 2014-01-14
@Kerman

The DB has nothing to do with it. If the DB fell off, then the Apache would give an error of connection with base. The file system is also irrelevant. Problems with the FS would immediately be visible in the logs and at startup.
A more likely cause is the network both servers are connected to. It's just that HTTP packets do not go through for a certain period of time. Or there is a problem with the firewall. You need to look which way ICMP goes and which TCP / IP.
A less likely reason is that the Apache connection limit has been exceeded. Here NGINX is in your hands.

A
Alexey Sundukov, 2014-01-14
@alekciy

The first thing to start with is to look at the logs. And what do the logs tell us?

S
Sergey Sokolov, 2014-01-15
@sergiks

Put server monitoring, for example, munin .
It will probably become clear where the bottlenecks are.

S
Sergey, 2014-01-15
@bondbig

The first thought is that Apache's workers are running out.
And, of course, you have to look.

F
fenric, 2014-01-14
@fenric

did you install nginx?

N
Nikolai Turnaviotov, 2014-01-18
@foxmuldercp

profile as much as possible - storage, memory, processor, engine, site code, with maximum logging of everything and everything, watch the execution time, then it will already be clear where the plug is

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question