Passenger & Nginx => 502 Bad Gateway Errors in Production

那年仲夏 提交于 2019-12-03 08:44:26

The first problem ("upstream response is buffered to a temporary file") was caused by some pages with a lot of content and was solved by increasing the buffer size as follows:

proxy_buffers 8 16k;
proxy_buffer_size 32k;
passenger_buffers 8 16k;
passenger_buffer_size 32k;

The second problem ('upstream prematurely closed connection while reading response header from upstream') was solved by increasing the memory on the server and switching Passenger to conservative spawn mode. (It appears to have been closely related to using an old Ruby gem which was trying to run background jobs.)

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