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

Adding a Discouraged IP breaks Nginx (or PHP5-FPM?)

Discussion in 'Server Configuration and Hosting' started by markku, Apr 7, 2014.

  1. markku

    markku Well-Known Member

    Whenever I add a new discouraged IP address, almost instantly thereafter the server gives the dreaded 504 Gateway timeout error. The only solution is to restart the PHP5-FPM process.

    In the logs I can see:

    2014/04/07 10:24:21 [error] 19979#0: *2522502 upstream timed out (110: Connection timed out) while reading response header from upstream, c$
    2014/04/07 10:25:25 [error] 19976#0: *2523289 connect() to unix:/var/run/php5-fpm-www.sock failed (11: Resource temporarily unavailable)$

    The weird thing is that this never happened before XenForo 1.3.

    Any ideas what could cause this?
     
    Last edited: Apr 7, 2014
  2. markku

    markku Well-Known Member

  3. Mike

    Mike XenForo Developer Staff Member

    If it's happening almost instantly, then that is more likely PHP crashing. What IP are you entering? There is new code in 1.3 relating to IPv6 support, but this is the only report we've had of any issues.
     
  4. markku

    markku Well-Known Member

    I haven't tried adding IPv6 IPs, these are all regular IPv4.

    I just tried again; and it's an instant crash. The moment I add an ip to the discouraged list, PHP crashes:
    The IP I tried discouraging was the above 84.23.235.31.

    What you might find interesting is that the IP that appeared in the crash log, is actually the IP I discouraged. I tested this by accessing the site using another browser that had a proxy enabled (the aforementioned IP). I was a guest. Then I discouraged my proxy IP. Then browsed the forum, no page would load, 502 Gateway error appeared, and the above PHP crash ensued.

    I'm now going to try and discourage a random IP, one that is not currently accessing the site.
    ...
    Test done.

    It works. Did not crash.

    So basically, the PHP crashes only when the IP that is being added to the discouraged list is accessing the site at the same time, or soon after the fact.

    Can anyone else reproduce, or might this be isolated only to my setup?
    If anyone has the below kind of setup running XF 1.3.0 and could try reproducing this, I'd be really grateful.

    Nginx: 1.4.1-3ubuntu1.3
    PHP: 5.5.3-1ubuntu2.2 (fpm-fcgi)
     
  5. markku

    markku Well-Known Member

    I'm not sure what was the reason, but upgrading XF to 1.3.1 has solved the problem.

    I am not able to reproduce it any more. Even when discouraging IPs that are currently accessing the site, the PHP doesn't crash.

    Well, I don't care what fixed it, but good that it is fixed.

    Thanks Mike!
     

Share This Page