1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Nginx/PHP-fpm/fastcgi error: "upstream prematurely closed connection"

Discussion in 'Server Configuration and Hosting' started by Coop1979, Apr 24, 2012.

  1. Coop1979

    Coop1979 Well-Known Member

    I've been testing my XenForo migration on a new server and after over a month of use, yesterday I starting getting 504 and now 502 errors on any php page I try to access. I looked in the Nginx logs and it shows the following errors:

    2012/04/24 10:37:23 [error] 554#0: *15 upstream prematurely closed connection while reading response header from upstream, client:, server: testxenforo.com, request: "GET / HTTP/1.1", upstream: "fastcgi://", host: "testxenforo.com"
    I was getting 504 errors and changed my backlog size within php-fpm.conf to "-1" per this tip: http://serverfault.com/questions/17...-out-error-with-almost-zero-load-on-a-test-se

    But now 502 errors persist and I am getting the error shown above.

    Does anyone have any ideas or have a server admin reference who I could hire to take a look?

    This is all a bit odd since there is pretty much just me using the server right now.
  2. Adam Howard

    Adam Howard Well-Known Member

    Are you using Nginx as a proxy to anything?

    -proxy_pass http://node/;
        +proxy_pass http://node;
    This could resolve it if you are.

    You may want to check your LOGS clearly (carefully). Client: Your IP shouldn't be all ZERO.

    If it was all working flawless before... 1 of 3 things has happen.

    1) You changed a setting
    2) You upgraded which changed a setting
    3) You've been hacked.

    The all zero IP gives that away.
  3. Coop1979

    Coop1979 Well-Known Member

    Nope, not using Nginx as a proxy to anything.

    I changed the ip address to all 0s for privacy reasons. I know that #1 and #2 aren't true, because Sunday night everything was fine and then Monday morning errors started popping up in the logs and I couldn't access the site.

    PC me if you are available for some consulting to take a look at it.
    TheVisitors likes this.
  4. Coop1979

    Coop1979 Well-Known Member

    Nevermind, it turned out to be that my DB server was not responding. A quick reboot fixed everything.

    I feel kinda dumb now.
    Shamil, TheVisitors and ChemicalKicks like this.

Share This Page