php-fpm config :
pm = dynamic
pm.max_children = 50
pm.start_servers = 20
pm.min_spare_servers = 10
and this is nginx config:
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
But When I send 50 requests at the same time, it is executed one by one.
This could be because of the sessions.
By default php store sessions in files and during request block this file, so next request can be started only after previous is finished.
Try to store sessions in memcache or database.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.