我们在我们的nginx日志中看到以下错误。 这个错误是有据可查的,但我们还没有弄清楚是什么原因造成的。 同时 ,发生此错误时是否可以显示自定义错误页面? 以同样的方式,我们可以有HTTP 500错误的error_page指令。
7252#0: *2711 upstream timed out (110: Connection timed out) while connecting to upstream, client: xxxx, server: domain.com, request: "GET /a_page.php?etc.... HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "thehost.com", referrer: "http://thereferrer.com/"
我不认为这个110错误实际上是回到客户端,更可能是一个504网关超时。 你可以定义一个自定义错误页面,并input相应的错误号码,以便在你的nginxconfiguration中呈现。 如果你已经在你的nginxconfiguration中有这个,只需在504中添加。
网站范围:
server { listen 80; error_page 504 /errorpage.htm;
关于实际的问题,很可能fastcgi将数据返回给nginx的时间太长了。 尝试增加nginx.conf中的fastcgi_read_timeout。 否则,请确保fastcgi运行正常。