nginx - Magento seperate PHP-FPM group for admin -


I run a Magento webstore with traffic levels, running on NGINX with PHP-FPM. The server environment is very powerful over land, so hardware is not a factor.

While running memory intensive operations in the backend, we are getting timeouts and errors, such as exporting and some custom indexes

write more efficient code and ignore the increase in pool size across the site. To do this, we want to find ways to allocate more resources backend, without reducing the size of the concurrent connection across the entire site.

It has been suggested that we have split the administrator of the site into a separate server / IP with different configurations. This will solve our problem, but can be very expensive, and seems like a big leap to solve a non-critical problem.

Is it possible to associate a different PHP FPM config with something like www.example? Com / Admin, ranging from different capabilities of different URLs to users?

Yes, this is possible.

In this example, we specify a default pool, pool 1. URL / Administrator, we will use Pool 2.

  http {# General .. # PHP FPM / Fastcgi Server upstream php5p1 {Server Unix: /var/run/php5-fpm-pool-1.sock; } Upstream php5p2 {server unix: /var/run/php5-fpm-pool-2.sock; }} Server {# default usage pool 1 is set $ custom_php_pool "1"; # If there is / admin, we use pool 2 ($ uri ~ * "^ / admin /") {$ $ set custom_php_pool "2"; } # ... place ~ \ .php $ {# ... # Pass with the PHP FPM / FastCGI server ($ custom_php_pool = '1') {fastcgi_pass php5p1; } If ($ custom_php_pool = '2') {fastcgi_pass php5p2; }}}  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -