nginx 504 网关超时
我正在 nginx 上使用 phusion-passenger 运行 Rails3.0.7 项目。 当我正在做 ajax 时,大约需要 15 分钟来处理。 调用 ajax 10 分钟后,它会跳出一个 Firebug 错误,显示“504 Gateway Time-out”。
有人可以告诉我如何找到问题吗?
谢谢,本
环境
- 操作系统:mac osx 10.6.7
- ruby:1.9.2p180安装了rvm
- gem:1.6.2
- 乘客3.0.7rails
- :3.0.7
- mysql:5.5.10安装了brew
- nginx:1.0.0独立安装了过路人
I'm running a rails3.0.7 project with phusion-passenger on nginx.
While I was doing a ajax which took about 15 mins to process.
It jump up an error with firebug which said "504 Gateway Time-out" after 10 mins from calling the ajax.
Could someon give me some idea of how I could find the problem.
Thanks, ben
environment
- OS: mac osx 10.6.7
- ruby: 1.9.2p180 installed with rvm
- gem: 1.6.2
- passenger 3.0.7
- rails: 3.0.7
- mysql: 5.5.10 installed with brew
- nginx: 1.0.0 stand alone installed with passender
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这是 nginx 超时错误。如果您确实希望留出 10 分钟以上的时间来完成任务,请查看以下文章,了解一些关于需要调整哪个参数以避免超时的线索。
如何防止 nginx 网关超时
That's an nginx timeout error. Look at the following article for some clues as to which parameter you need to adjust to avoid the timeout, if you really want to allow more than 10 minutes to complete the task.
How do I prevent a gateway timeout with nginx
我在 Mac OS X (Yosemite) 上的 Rails 4 上也遇到了类似的问题。所以我将以下内容添加到我的特定 Nginx 位置中。
所以我的 Nginx 整体配置如下。
I had the similar issue with Rails 4 on Mac OS X (Yosemite). So I have added the below into my specific Nginx location.
So my overall configuration for Nginx as below.
这是 phusion-passenger 的问题。
您应该更改文件:(gems > Passenger-3.0.18 > ext > nginx > Configuration.c)
原点超时为 600000,只需 10 分钟。
我尝试更改 nginx.conf,但没有成功。
It's a problem from phusion-passenger.
You should alter the file:(gems > passenger-3.0.18 > ext > nginx > Configuration.c)
The origin timeout is 600000, just 10 minutes.
I've tried to change the nginx.conf, but didn't work.
这是 nginx 超时错误。
That's an nginx timeout error.