首页 > 服务器 > 解决(nginx)504 Gateway Time-out

解决(nginx)504 Gateway Time-out

2009年04月09号
查看评论 发表评论 3,235次浏览

504 Gateway Time-out问题常见于使用nginx作为web server的服务器的网站
一般看来, 这种情况可能是由于nginx默认的fastcgi进程响应的缓冲区太小造成的, 这将导致fastcgi进程被挂起, 如果你的fastcgi服务对这个挂起处理的不好, 那么最后就极有可能导致504 Gateway Time-out
现在的网站, 尤其某些论坛有大量的回复和很多内容的, 一个页面甚至有几百K
默认的fastcgi进程响应的缓冲区是8K, 我们可以设置大点
在nginx.conf里, 加入:fastcgi_buffers 8 128k
这表示设置fastcgi缓冲区为8×128k
当然如果您在进行某一项即时的操作, 可能需要nginx的超时参数调大点, 例如设置成60秒:
send_timeout 60;

类别服务器 标签
  1. puma online store
    发表于 2010年07月24号 21时14分27秒 | 1楼

    Just wish to thank you for all the lights that you put on my path via your quotes, your themes, your issues, your works.

  2. timberland mens boots
    发表于 2010年07月25号 11时51分22秒 | 2楼

    Well that’s a honest and true quotation

  3. air jordan shoes
    发表于 2010年07月27号 11时55分36秒 | 3楼

    Well said! And this just came to me…

  4. Herve Leger Dresses
    发表于 2010年07月27号 16时02分46秒 | 4楼

    Great article anyway

评论页数:
1 2 173
  1. 目前没有通告
你必需 登陆 才能发表评论.