来自nginx的反向代理将无法运行。网站是正常的

时间:2010-08-20 14:23:35

标签: nginx reverse-proxy

我的nginx存在一些问题。首先,启动是正常的,通过代理冲浪足够快。但过了一会儿,5 - > 10访问后,代理变得越来越慢。直到它停止工作。即使我尝试使用“-s stop”停止nginx,请仔细检查是否有nginx.exe正在运行,然后重新启动nginx。它仍然不起作用。

Nginx.exe仍在运行。 端口仍在使用中。

我在Windows Server 2003 Enterprise Sp2 IIS6上运行

这是我从日志中读取的错误。

2010/08/20 21:14:37 [debug] 1688#3548: posted events 00000000
2010/08/20 21:14:37 [debug] 1688#3548: worker cycle
2010/08/20 21:14:37 [debug] 1688#3548: accept mutex lock failed: 0
2010/08/20 21:14:37 [debug] 1688#3548: select timer: 500
2010/08/20 21:14:37 [debug] 1580#5516: select ready 0
2010/08/20 21:14:37 [debug] 1580#5516: timer delta: 500
2010/08/20 21:14:37 [debug] 1580#5516: posted events 00000000
2010/08/20 21:14:37 [debug] 1580#5516: worker cycle
2010/08/20 21:14:37 [debug] 1580#5516: accept mutex locked
2010/08/20 21:14:37 [debug] 1580#5516: select event: fd:176 wr:0
2010/08/20 21:14:37 [debug] 1580#5516: select timer: 500
2010/08/20 21:14:38 [debug] 1688#3548: select ready 0
2010/08/20 21:14:38 [debug] 1688#3548: timer delta: 500
2010/08/20 21:14:38 [debug] 1688#3548: posted events 00000000
2010/08/20 21:14:38 [debug] 1688#3548: worker cycle
2010/08/20 21:14:38 [debug] 1688#3548: accept mutex lock failed: 0
2010/08/20 21:14:38 [debug] 1688#3548: select timer: 500

这是我写的配置文件:

#user  deploy;
worker_processes  2;
error_log   /app/nginx/logs/error.log debug;

events {
  worker_connections  64;
}

http {
  include        mime.types;
  default_type   application/octet-stream;
  sendfile        on;
  #tcp_nopush     on;
  keepalive_timeout  65;
  tcp_nodelay        on;

  gzip  on;
  gzip_min_length  1100;
  gzip_buffers     4 8k;
  gzip_types       text/plain;

  upstream mongrel {
        server 127.0.0.1:5000;
        server 127.0.0.1:5001;
        server 127.0.0.1:5002;
        #server 127.0.0.1:5003;
        #server 127.0.0.1:5004;
        #server 127.0.0.1:5005;
        #server 127.0.0.1:5006;
  }

  server {
    listen       81;
    server_name  site.com;
    root         C:/app/sub/public;
    index        index.html index.htm;

    try_files  $uri/index.html $uri.html $uri @mongrel;

    location @mongrel {
      proxy_set_header  X-Real-IP        $remote_addr;
      proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
      proxy_set_header  Host             $http_host;
      proxy_redirect    off;
      proxy_pass        http://mongrel;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
      root   html;
    }
  }
}

0 个答案:

没有答案