Здравствуйте ))
Как можно настроить связку php7.0-fpm nginx на нагрузку 5000 запросов в 1 секунду ?
Максимум получается дойти до 1500 и то оно не всегда отрабатывает ...
nginx.conf
user www-data;
worker_processes 8;
pid /run/nginx.pid;
worker_rlimit_nofile 300000;
events {
worker_connections 10000;
multi_accept on;
use epoll;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
client_max_body_size 10M;
types_hash_max_size 2048;
server_tokens off;
reset_timedout_connection on;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log ;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip off;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
virtual.conf
server {
listen 80;
listen [::]:80 ;
server_name ;
access_log /var/log/nginx/gate.acces.log;
error_log /var/log/nginx/gate.error.log;
root /var/www/*****/public;
# Add index.php to the list if you are using PHP
index index.html index.php index.htm index.nginx-debian.html;
location / {
if (!-d $request_filename){
set $rule_0 1$rule_0;
}
if (!-f $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/ /index.php last;
}
}
location ~ .php$ {
try_files $uri =404;
fastcgi_param ENVIRONMENT SANDBOX;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}