I run a website with a lot of traffic. I'm using nginx and php fast-cgi. However, when loading simple php documents in the browser, it takes up to 5-6 seconds before the page is loaded. Sometimes it even just results in a "404 not found" nginx error.
When using "htop" on debian, I am nowhere near using the ressources of my server. So what's going on? Is it nginx? Is it PHP-fast-cgi? I can't tell where the bottle neck is.
A snippet of my nginx config:
user www-data www-data; worker_processes 2; events { worker_connections 4048; } http { include mime.types; default_type application/octet-stream; sendfile on; #tcp_nopush on; keepalive_timeout 10; include /usr/local/nginx/sites-enabled/*; ... }
A snippet of my fast-cgi config:
EXEC_AS_USER=www-data # Host and TCP port for FASTCGI-Listener (default: localhost:9000) FCGI_HOST=localhost FCGI_PORT=9000 # Environment variables, which are processed by PHP PHP_FCGI_CHILDREN=8 PHP_FCGI_MAX_REQUESTS=0
Thank you very much!!