Answer the question
In order to leave comments, you need to log in
Why is the site on Nginx + PhpFpm stupid without Apache?
Good day!
The problem is this: The site at random times, regardless of the load, as well as the number of users, starts to blunt, more precisely, the Load Average (top) parameter starts to rise.
the situation is as follows: (after the problem appeared, the following was done)
the Nginx + PhpFpm bundle was installed, Apache was completely removed.
configured caching for statics.
under Idle load, the processor runs from 100 to 80, sometimes it can drop a little, but not to say that it is heavily loaded! (top)
RAM in most cases remains free, sometimes goes to zero, but rarely! (top)
at such moments, database queries start to execute for a long time (simple UPDATE by primary_key) reaches 30 seconds. No slow requests in normal mode
I checked the database - there are no errors. (mysqlcheck) there are no critical recommendations either. (mysqltuner) The
database hangs PhpFpm due to the long execution of queries, and Nginx in turn, and errors 502 and 504 pop up.
the last time at the time of loading, as soon as everything started I disabled the db. it was disconnected for a long time, as always, when the load did not fall, it remained. And without a DB the site is not loaded in general. on the first line of the code, a connection error occurs (this is a provided error) to the database and the script stops.
Conclusion:
without a database, a connection error is shown in principle without delay, almost always. but the Load Average did not fall, and even vice versa!
Also, at peak times, with about 60 people visiting at the same time, the site worked fine, and LoadAverage was around 0.30
help me please!
Answer the question
In order to leave comments, you need to log in
in general, those hosting support transferred the site to another server and everything seems to be working. they didn’t say what the problem is, but I suspect the HDD
as always, let's start with a hackneyed valyn
LOGI TO THE STUDIO CONFIGURES TO THE STUDIO iotop
-oka
- what does it say?
For good, the site itself, maybe you have a page of 40 meters and a channel of 10 megabits.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question