I have a rails request which generates a long redirect url, over 1k
chars unfortunately, here is how things proceed
- user can use the entire site fine
- users posts to the action with the long redirect
- rails app processes and send back the redirect
- i see "upstream sent too big header while reading response header
from upstream" in the nginx log
- 502 bad gateway in the web browser
After searching, I have tried various permutations of:
fastcgi_buffers, fastcgi_buffer_size, proxy_buffers, proxy_buffer_size
and none have worked.
Any advice?
It's got nothing to do with buffer sizes. Nginx simply refuses to
accept response headers that are larger than a certain limit for
security reasons. You should check which headers your web app are
exactly sending and verify whether that's normal.
--
Phusion | The Computer Science Company
Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)