- 论坛徽章:
- 0
|
本帖最后由 huifeideluotuo 于 2010-07-27 11:10 编辑
配置环境
硬件环境:
CPU:Intel(R) Xeon(R) CPU 3050 @ 2.13GHz
内存:4G
软件环境:centos5.4 + php5.2.8 + nginx0.8.37
nginx.conf配置文件如下:- user www www;
- worker_processes 2;
- worker_rlimit_nofile 51200;
- events
- {
- use epoll;
- worker_connections 51200;
- }
- http
- {
- include mime.types;
- default_type application/octet-stream;
-
- server_names_hash_bucket_size 256;
- client_header_buffer_size 1024k;
- large_client_header_buffers 4 1024k;
- client_max_body_size 32m;
- client_body_buffer_size 256k;
- client_header_timeout 3m;
- client_body_timeout 3m;
- send_timeout 3m;
-
- sendfile on;
- tcp_nopush on;
- keepalive_timeout 60;
- tcp_nodelay on;
- fastcgi_intercept_errors on;
- fastcgi_connect_timeout 500;
- fastcgi_send_timeout 500;
- fastcgi_read_timeout 500;
- fastcgi_buffer_size 1024k;
- fastcgi_buffers 8 1024k;
- fastcgi_busy_buffers_size 1024k;
- fastcgi_temp_file_write_size 1024k;
- gzip on;
- gzip_min_length 1k;
- gzip_buffers 4 16k;
- gzip_http_version 1.0;
- gzip_comp_level 2;
- gzip_types text/plain application/x-javascript text/css application/xml;
- gzip_vary on;
复制代码 问题现象描述:
nginx在运行时出现一些异常问题,此时静态页面(html)可以打开,但是不能加载动态页面,一直处于等待状态,此时重新启动nginx后恢复正常,查看日志错误内容如下:
2010/07/26 09:59:52 [error] 12929#0: *304919 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.10.4, server: 123.test.cn, request: "GET /index.php?module=default&submod=user_setting&method=user_home_page HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "123.test.cn", referrer: "http://123.test.cn/index.php?method=left&parent_id=121§ion_id=default&open_mainframe=1"
2010/07/26 10:03:44 [error] 12930#0: *311831 connect() failed (110: Connection timed out) while connecting to upstream, client: 192.168.10.4, server: 123.test.cn, request: "GET /index.php?method=left&parent_id=3§ion_id=customer&open_mainframe=1 HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "123.test.cn", referrer: "http://123.test.cn/index.php?method=top§ion_id=&main_url="
也查找了原因,很多朋友也遇到这样的问题,但是没有解决,说是nginx不稳定的原因,如果不稳定,那QQ、迅雷怎么还用呢?
请兄弟们指教,谢谢! |
|