Hi, I need help to figure out here is the problem and why a simple php file with echo "teste" sometimes take more than 15s to load. My server have 300 req/s and about 4 milions visitors day, this is the first time I use Lighttpd and I already try a lot of configs on fastcgi but same result. Can somenone help me with this? Server specs 24GB RAM 8 CORES SSD DISK
You seems to have a very high spec for a server. You might want to check out what causing the loading slow. maybe some external links in the site that is causing that slowness or php script that is taking time to load. for a start, try install httpwatch on your browser to see what is loading slower than others. =P You can download the httpwatch directly here - http://adf.ly/1tsuS
But this happen when I open a php file with echo inside...after the server starts and have about 2000 connections if I open php file ...
Maybe you forgot cache in nginx and php?? Check the fastcgi limitation on config files and also report the iowait of this, load average..
top - 15:30:24 up 17:55, 3 users, load average: 0.00, 0.15, 0.16 Tasks: 647 total, 3 running, 644 sleeping, 0 stopped, 0 zombie Cpu0 : 49.2%us, 3.7%sy, 0.0%ni, 44.2%id, 0.0%wa, 0.0%hi, 3.0%si, 0.0%st Cpu1 : 25.5%us, 2.6%sy, 0.0%ni, 71.5%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st Cpu2 : 15.7%us, 1.3%sy, 0.0%ni, 82.6%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st Cpu3 : 5.0%us, 1.0%sy, 0.0%ni, 94.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu4 : 22.8%us, 3.0%sy, 0.0%ni, 73.8%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st Cpu5 : 13.5%us, 1.6%sy, 0.0%ni, 84.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu6 : 2.6%us, 0.7%sy, 0.0%ni, 96.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu7 : 2.9%us, 0.0%sy, 0.0%ni, 96.7%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st Mem: 24726108k total, 7587704k used, 17138404k free, 134620k buffers Swap: 1046520k total, 0k used, 1046520k free, 3058428k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2195 mysql 20 0 431m 87m 4188 S 9.0 0.4 1:54.84 mysqld 3596 nginx 20 0 218m 11m 4132 S 3.3 0.0 0:00.76 php-cgi 3106 nginx 20 0 219m 12m 4160 S 3.0 0.1 0:02.02 php-cgi 3534 nginx 20 0 219m 12m 4136 S 2.7 0.1 0:01.06 php-cgi 3526 nginx 20 0 219m 12m 4140 S 2.3 0.1 0:00.78 php-cgi 3582 nginx 20 0 219m 12m 4144 S 2.3 0.1 0:00.98 php-cgi 4084 nginx 20 0 218m 10m 3860 S 2.3 0.0 0:00.07 php-cgi 3249 nginx 20 0 219m 12m 4152 S 2.0 0.1 0:01.41 php-cgi 3257 nginx 20 0 219m 12m 4152 S 2.0 0.1 0:01.32 php-cgi
When I have much connections I start getting errors like "FastCGI sent in stderr: "PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: php_network_getaddresses: getaddrinfo failed: Name or service not known in"