Magento 1.9.2.2 is very slow on product save within an NGINX enviroment. I use following settings: PHP-FPM 5.6.8 / 5.6.2
Php.ini
memory_limit = 2048M
max_execution_time = 1800
upload_max_filesize = 100M
session.auto_start = off
suhosin.session.cryptua = off
zend.ze1_compatibility_mode = Off
apc.shm_size=1024M
apc.num_files_hint=10000
apc.user_entries_hint=10000
apc.max_file_size=5M
apc.stat=0
apc.optimization=0
apc.include_once_override=1
apc.ttl=48000
apc.user_ttl=48000
realpath_cache_size = 32k
realpath_cache_ttl = 7200
default_socket_timeout = 90
pdo_mysql.cache_size = 2000
output_buffering = 4096
NGINX DIRECTIVES
location /{FOLDER} {
client_max_body_size 100M;
index index.html index.php; ## Allow a static html file to be shown first
#try_files $uri $uri/ /{FOLDER}index.php$is_args$args; ## If missing pass the URI to Magento's front handler
try_files $uri $uri/ @handler{FOLDERMD5}; ## If missing pass the URI to Magento's front handler
expires 30d; ## Assume all files are cachable
## These locations would be hidden by .htaccess normally
location /{FOLDER}app/ { deny all; }
location /{FOLDER}includes/ { deny all; }
location /{FOLDER}lib/ { deny all; }
location /{FOLDER}media/downloadable/ { deny all; }
location /{FOLDER}pkginfo/ { deny all; }
location /{FOLDER}report/config.xml { deny all; }
location /{FOLDER}var/ { deny all; }
location /{FOLDER}dev/ { deny all; }
location /{FOLDER}var/export/ { ## Allow admins only to view export folder
auth_basic "Restricted"; ## Message shown in login window
auth_basic_user_file /var/www/magento-demo.timmehosting.de/.htpasswd; ## See /etc/nginx/htpassword
autoindex on;
}
location /{FOLDER}downloader/ {
index index.php;
}
location ~ \.php/ { ## Forward paths like /js/index.php/x.js to relevant handler
rewrite ^(.*\.php)/ $1 last;
}
location /{FOLDER}skin/m/ {
rewrite ^/{FOLDER}skin/m/([0-9]+)(/.*\.(js|css))$ /{FOLDER}lib/minify/m.php?f=$2&d=$1 last;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
{FASTCGIPASS}
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_param HTTPS $fastcgi_https;
#fastcgi_param MAGE_RUN_CODE default; ## Store code is defined in administration > Configuration > Manage Stores
fastcgi_param MAGE_RUN_TYPE store;
fastcgi_temp_file_write_size 10m;
fastcgi_busy_buffers_size 512k;
fastcgi_buffer_size 512k;
fastcgi_buffers 16 512k;
fastcgi_read_timeout 1200;
<tmpl_if name='php' op='==' value='hhvm'>error_page 500 501 502 503 = @phpfallback{FOLDERMD5};</tmpl_if>
}
}
location @handler{FOLDERMD5} { ## Magento uses a common front handler
rewrite / /{FOLDER}index.php;
}
<tmpl_if name='php' op='==' value='hhvm'>
location @phpfallback{FOLDERMD5} {
client_max_body_size 100M;
try_files $uri =404;
include /etc/nginx/fastcgi_params;
{PHPFALLBACKFASTCGIPASS}
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_param HTTPS $fastcgi_https;
#fastcgi_param MAGE_RUN_CODE default; ## Store code is defined in administration > Configuration > Manage Stores
fastcgi_param MAGE_RUN_TYPE store;
fastcgi_temp_file_write_size 10m;
fastcgi_busy_buffers_size 512k;
fastcgi_buffer_size 512k;
fastcgi_buffers 16 512k;
fastcgi_read_timeout 1200;
}
</tmpl_if>
pagespeed on;
pagespeed FileCachePath /var/ngx_pagespeed_cache;
#pagespeed FetchHttps enable,allow_self_signed;
# let's speed up PageSpeed by storing it in the super duper fast memcached
pagespeed MemcachedThreads 1;
pagespeed MemcachedServers "localhost:11211";
# Filter settings
pagespeed RewriteLevel CoreFilters;
pagespeed EnableFilters collapse_whitespace,remove_comments;
# Ensure requests for pagespeed optimized resources go to the pagespeed
# handler and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header "" "";
access_log off;
}
location ~ "^/ngx_pagespeed_static/" {
access_log off;
}
location ~ "^/ngx_pagespeed_beacon$" {
access_log off;
}
location /ngx_pagespeed_statistics {
allow 127.0.0.1;
deny all;
access_log off;
}
location /ngx_pagespeed_global_statistics {
allow 127.0.0.1;
deny all;
access_log off;
}
location /ngx_pagespeed_message {
allow 127.0.0.1;
deny all;
access_log off;
}
location /pagespeed_console {
allow 127.0.0.1;
deny all;
access_log off;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
It is very fast in frontend. But on save it is very slow.
Do you have any recommendations for a fix?