nginx运行异常,“connect() failed (110: Connection timed out)”问题?
时间:2010-07-27
来源:互联网
本帖最后由 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配置文件如下:
复制代码
问题现象描述:
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、迅雷怎么还用呢?
请兄弟们指教,谢谢!
配置环境
硬件环境:
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、迅雷怎么还用呢?
请兄弟们指教,谢谢!
作者: huifeideluotuo 发布时间: 2010-07-27
你php部分怎么搞的
作者: scyzxp 发布时间: 2010-07-30
你php部分怎么搞的
作者: scyzxp 发布时间: 2010-07-30
建议关闭gzip试下
作者: 打酱油 发布时间: 2010-08-12
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28