M
M
miki1312015-02-14 21:15:16
PHP
miki131, 2015-02-14 21:15:16

How to set up PHP-FPM?

The site is hosted on this host fastvps.ru/dedicated tariff EX-60
Intel® Core™ i7-920 Quadcore 4 physical cores, 8 threads (hyper-threading)
48 GB DDR3
The visitor was 18+k and started giving 502 errors.
How it is correct (and what) it is necessary to configure the server.
Now these settings are

pm.max_children = 512
pm.start_servers = 52
pm.min_spare_servers = 40
pm.max_spare_servers = 64

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2015-02-14
@merryjane

You first need to collect statistics on consumed resources in order to understand what you are up against. And does it make sense to raise the number of fpm threads. Perhaps a plug in the database in general, then it is necessary to optimize its settings already.
In the simplest case, you need to get statistics on the load on the CPU, disk subsystem, memory consumption.
Plus, everything is the same but for the processes running on the server.
The easiest thing is to put a ready-made solution that can collect and aggregate all this into graphs so that it is visual. In my opinion, munin is very convenient in this regard. It is easy to set up and most of the requirements are covered by standard plug-ins out of the box.
And then look at the resulting graphs at the moments of load and analyze them.

P
Puma Thailand, 2015-02-14
@opium

look at the logs
cut the timeout to a minimum

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question