在Debian 6.0.1上作为代理运行的nginx/1.0.12在运行一小段时间后开始抛出以下错误:
connect() to upstreamip:80 failed (99: Cannot assign requested address) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: localhost, request: "GET / HTTP/1.1", upstream: "http://upstreamip:80/", host: "requesteddomain.com"
并非所有请求都会产生此错误,因此我怀疑它与服务器的负载和它遇到的某种限制有关.
我尝试过将ulimit -n提高到50k,将worker_rlimit_nofile提升到50k,但这似乎没有帮助.lsof -n为nginx显示总共1200行.传出连接是否存在系统限制,可能会阻止nginx打开与其上游服务器的更多连接?
nginx ×1