2
2
2462015-03-10 13:22:39
PHP
246, 2015-03-10 13:22:39

Problems with nginx + php-fpm. Where to begin?

Hello. I ran into a problem, please tell me:
The server is running nginx + php-fpm. The project is relatively loaded, and from time to time there are problems with access to the application (even the login page in the browser starts to open for a long time and 502 from nginx is returned from time to time). Sometimes the problem disappears by itself, sometimes after restarting the server. The connection to the database is stable and fast, that is, it's not about it. Could it be that one of the php-fpm processes "breaks" and stops processing requests correctly? If yes, how can you check? Or where to start looking for a problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Burov, 2015-03-10
@BuriK666

from viewing the php-fpm logs,
most likely you have something like

WARNING: [pool www] server reached pm.max_children setting (N),  consider raising it.

P
Puma Thailand, 2015-03-10
@opium

Hire an admin, he will set up monitoring and statistics for you and you will immediately see what the problem
is, in this case it is obvious that PHP is overloaded, that is, there are too many users or scripts that are too slow, a kind of ddos, it is logical to look at slow logs in muscle or PHP and optimize the slow part or how to try to optimize the server side

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question