502 Bad Gateway with unexpected fastcgi record #160
I have been testing this configuration locally and I keep getting these 502 Bad Gateway. They appear to happen when there is a redirect to a URL with arguments. An example would be after user login the page redirects to "/node?q=/" which throws a 502 Bad Gate error. If I refresh the page, then it loads as it should.
Checking error logs reveals the following error message:
2014/02/25 15:34:09 [error] 18430#0: *12 upstream sent unexpected FastCGI record: 3 while reading response header from upstream, client: 127.0.0.1, server: d82.localhost, request: "GET /node?q=/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "d82.localhost", referrer: "http://d82.localhost/"
This happens with unix sockets as well.
If I revert to my old configuration then login redirects to a clean URL (/node) instead and there is no 502 error.
Can you shed some light on what area of config I should be looking at? I am using nginx 1.2.6
@perusio I made(not finished) a juju charm, using your configurations, but! the 502 thing is still happening, and I really don't know why :(
Some help? please :)
It also happened to one of my project. Error 502 often occurs at the beginning, but when in reloading, back to normal. and this happens at random but constant. I also tried various combinations of settings does not work, I finally found the discussion here: https://groups.drupal.org/node/283558#comment-1016818 and commenting out keepalive 5 in upstream_phpcgi_unix.conf fixed this 502 issue for me.