nginx + passenger + rails 3.1 = 502 bad gateway?

筅森魡賤 提交于 2019-12-03 08:56:47
conny

The "V" in VM is for Virtual. See also answers on other SO questions, e.g. Virtual Memory Usage from Java under Linux, too much memory used.

That top 147 MB does not hint of anything unusual whatsoever. Your 502 errors mean something else is wrong with the worker processes from Passenger's point of view. You should check your Rails & Nginx log files for clues, and perhaps passenger-status --show=backtraces.

Billy

Try setting passenger_spawn_method conservative -- apparently there are issues with Passenger default forking settings and Rails 3.1

I just meet such deadly "502 Bad Gateway error" reported by nginx, web stack is Ubuntu 12.04 + Rails 3.2.9 + Passenger 3.0.18 + nginx 1.2.4, it spent me 2 hours to found the root cause:

My rails application no need database support, so I just remove the gem 'sqlite3' in the Gemfile, it works fine in development mode, but will lead 502 Bad Gateway in production mode.

So after add back gem 'sqlite3' in Gemfile, such 502 Bad Gateway error disappear....

H6.

I had the same problem and in my case it helped to increase the passenger_max_pool_size setting in the Nginx configuration file.

Maybe you can also take a look on the following postings which also helped me finding this solution:

It was the same for me in Rails 4, but I have added a "SECRETKEYBASE" in /confirg/secrets.yml

production:
secretkeybase: # add yours here
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!