502 Nginx&的错误网关错误Rails中的乘客3.1

时间:2014-01-03 10:15:51

标签: ruby-on-rails nginx passenger

我的服务器突然失败了。我尝试使用sudo service nginx restart重启nginx,但失败了。

然后期待error.log

2014/01/03 10:11:44 [crit] 31821#0: *699 connect() to /tmp/passenger.1.0.18076/generation-1/request failed (2: No such file or directory) while connecting to upstream, client: 00.00.00.00, server: staging.com, request: "GET / HTTP/1.1", upstream: "passenger:/tmp/passenger.1.0.18076/generation-1/request:", host: "test.co"

任何变通办法都将受到赞赏。

1 个答案:

答案 0 :(得分:2)

您的系统上可能有/ tmp清洁器守护程序删除了必要的Passenger套接字文件,导致您看到失败。尝试将passenger_temp_dir设置为某个不是/ tmp:http://www.modrails.com/documentation/Users%20guide%20Nginx.html#PassengerTempDir

的目录