There is a shop on Opencart. The product page has a large range of options, as a result, we have 1000 simultaneous GET requests when loading a page with thumbnail images - the images themselves are submitted via CDN. The loading of the page is delayed - the search suggests that Nginx tuning is needed, but the use of various configs did not help much. I need advice on where to dig.
ps In the config there can be a lot of excess, or vice versa - I ask without much indignation, he experienced a sea of transformations :)
pps VPS server, 2 GB of memory
user apache; worker_processes 2; worker_rlimit_nofile 100000; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 4000; multi_accept on; use epoll; } http { include /etc/nginx/mime.types; default_type application/octet-stream; fastcgi_cache_path /etc/nginx/cache/ levels=1 keys_zone=fastcgi_cache:64m max_size=256m inactive=1d; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 10; send_timeout 120; keepalive_requests 10000; client_body_timeout 15; client_header_timeout 15; include /etc/nginx/conf.d/*.conf; include /etc/nginx/vhosts/*/*.conf; server { server_name localhost; disable_symlinks if_not_owner; include /etc/nginx/vhosts-includes/*.conf; location @fallback { error_log /dev/null crit; proxy_pass http://127.0.0.1:8080; proxy_redirect http://127.0.0.1:8080 /; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; access_log off ; } location / { fastcgi_pass unix:/var/www/php-fpm/www-root.sock; fastcgi_index index.php; fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f mysite@mysite.ru"; include fastcgi_params; fastcgi_buffering on; fastcgi_buffers 8 512k; fastcgi_busy_buffers_size 1024k; fastcgi_cache_methods GET; fastcgi_pass_header Cookie; fastcgi_ignore_headers Cache-Control Expires Set-Cookie; fastcgi_cache_key $request_uri; fastcgi_cache fastcgi_cache; fastcgi_temp_path /etc/nginx/temp; fastcgi_cache_use_stale updating error timeout invalid_header http_500; fastcgi_cache_valid 10s; #fastcgi_cache_valid any 10s; } listen 80; } }
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|bmp|txt)$ { access_log off; expires 14d; break; }location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|bmp|txt)$ { access_log off; expires 14d; break; }location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|bmp|txt)$ { access_log off; expires 14d; break; }- Total Pusher