I have an nginx server with some requests that are slower and as such could saturate a PHP FPM pool. I don't mind if these requests get dropped and also more importantly they don't affect the normal requests.
I thought that I could create another limited PHP-FPM pool for these requests and I have done this but am struggling with the nginx side of things.
My current config looks like...
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
What I want to happen is that any request to certain explicit paths such as /test/update.php
to go to another pool with the address of fastcgi_pass unix:/run/php/php7.0-fpm-secondary.sock;
.
Is this possible?
Это может сделать то, что вы ищете, но это не проверено.
location ~ /test/update.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm-secondary.sock;
}