RT
目前 ,当并发达到20 之后, 打开php 页面将会变得很慢,再多了 ,就彻底 报 500 了。这个时候,系统的cpu 跟 内存 并且都不高
下面是nginx 的配置文件:
PHP code
worker_processes 1;
error_log logs/error.log crit;
pid ../data/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
access_log off;
# log_format processtime '"$request" $status $request_time ';
# access_log logs/access.log processtime;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 120;
#gzip on;
server {
include port.conf;
client_max_body_size 20m;
rewrite ^/netcenter/(.+)$ /$1;
rewrite ^/(.+)\.(asmx|aspx)$ /$1.php;
location / {
include root.conf;
}
location = / {
include root.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME index.php;
include fastcgi_params;
}
location ~* \.(php|asmx|aspx)$ {
include root.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;