Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Nginx PHP-FPM understanding

$
0
0
Hi there,

I'm new on this business and i'm setting a new server for a API that receive a lots of requests. I'm using Forge (from Laravel, but in this case i'm using Lumen) and i started to read and follow many tutorials to get better performance.

The server it's a 16GB RAM with 8 CPU cores from Digital Ocean. I used siege and ab for testing and i think the server is handling a lots requets/s (10k) but when i do the testing even with 25 concurrent users, the response time increase a lot (i've the website in dev pointing to this new server, and watching the ajax requests). I noticed by using htop that the CPU's are all working but the RAM is only using 2GB.

I've changed the open file limits and some systemctl tweaks and switched from php-fpm.sock to unix sock. My general configs are:

nginx.conf
worker_processes auto;
pid /run/nginx.pid;
worker_rlimit_nofile 999999;
events {
worker_connections 65000;
multi_accept on;
use epoll;
}

php-fpm pool.d conf:
pm = dynamic
pm.max_children = 100
pm.start_servers = 20
pm.min_spare_servers = 10
pm.max_spare_servers = 20

php.ini
memory_limit = 1024M (i increase this but i didn't saw any effects)

I would appreciate any help/suggestion to get better performance on the response of the php processing or any good reading about this.

Thanks for the help,
Pedro Lopes

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>