F
F
fdff72019-05-10 16:12:01
linux
fdff7, 2019-05-10 16:12:01

Sites hang periodically - 502 Bad Gateway?

They begin to hang gradually, become dull, then they don’t respond at all for about 49-50 minutes, then they start working normally again for about 40 minutes, then again they don’t respond at all for about 49-50 minutes, etc.
OS: CentOS Linux release 7.5.1804 (Core)
No panels
Intel E3-1230v3
1TB HDD
8GB
PHP 5.6.38 (cli)
A lot of domains (and subdomains), and even more (about 70 million inodes (mostly txt files with text )).
All processes seem to be as usual, I don’t see any changes in the load when switching to site freezes.
Before the start of all this, no work was carried out on the server, nothing new was added, there is still a lot of free space.
service named status
Active: failed (Result: timeout)
but it seems that the named service stopped restarting, only manually (support helped, but did not help).
Perhaps the HDD began to pull out and moving to an SSD will solve this problem?
Thanks a lot for any advice!
UPDATE: The problem was in the HDD, after moving everything to the SSD - this problem was solved.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alfieros, 2019-05-10
@mrsexy

Obviously an incomprehensible move with 1 screw, and even not in RAID. Yes, an SSD will improve the situation, and possibly solve this problem. This config can only be used for a home web server.
But for the future, if there are more than 3-5 sites, make a RAID array. This will speed up the work and help save data in case one of the screws dies.

N
NMNH, 2019-05-11
@NMNH

Let's start with the file system.
One of the most common mistakes developers (even experienced ones) make is to underestimate the importance of limiting the number of files per directory. If there are more than 1000 of them or approaching, it is very desirable to split them into subdirectories.
It would also be useful to check how many inodes are generally available to the system, maybe you are already swimming at the limit and any new dozen of temp files fills up the whole thing))
ps (#df -i)

N
nrgian, 2019-05-10
@nrgian

Wangyu - the DBMS can not cope. Make sure that this is the case, add the necessary indexes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question