504 Gateway Timeout

Home Forums BulletProof Security Free 504 Gateway Timeout

This topic contains 9 replies, has 2 voices, and was last updated by  AITpro Admin 2 years, 2 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #28778

    AJ
    Participant

    So i cant figure this out. 2 weeks ago, out of the blue. I get a 504 error logging in on my wordpress site. It just randomly started.  I talked to my Host.  I talked to my personal ISP.  no problems they could find.  The weird things are this, I can log in NO problems on my phone and through a proxy to other US IPs. its only home address and half the proxies.  But the moment i disable BPS,  I can log in fine from ANYwhere.(i disabled other plugins and did not affect anything, BPS was my last to disable)  I did not update any plugins 2 weeks before this started. so its just showed up “randomly” one day.  any ideas?

    #28780

    AITpro Admin
    Keymaster

    https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.5

    10.5.5 504 Gateway Timeout

    The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI (e.g. HTTP, FTP, LDAP) or some other auxiliary server (e.g. DNS) it needed to access in attempting to complete the request.

    Note: Note to implementors: some deployed proxies are known to return 400 or 500 when DNS lookups time out.

    A 504 Gateway Timeout error typically indicates a server-side problem.  ie your Gateway or Proxy Server is not processing something correctly and the Request times out.  To see if anything in BPS is related to the problem do the standard BPS troubleshooting steps:   http://forum.ait-pro.com/forums/topic/read-me-first-free/#bps-free-general-troubleshooting and check your BPS Security Log for log entries.  Hopefully you are not logging into your website using a Free Proxy since your login credentials can be easily captured by a Free Proxy.  Free Proxies are good for visiting websites or browsing when you do not want to expose your Public IP address.

    Other Related Forum Topics
    http://forum.ait-pro.com/forums/topic/504-gateway-timeout-504-error/
    http://forum.ait-pro.com/forums/topic/php-info-and-php-error-log-not-visible/

    #28803

    AJ
    Participant

    im still working through this problem. I literally went through and disabled all my plugins again, and anything BUT bps that i could think of, still could not access through my normal isp, but still could through private(ish) proxy.-I change my pwds once a day.  What i do is get it to login via some weird crazy proxy(private-ish revolving) , which not all login, like MY isp, but once i find one that does, i can turn off the proxy and I can go in and out until the site logs me out(2 days) then i repeat.

    my site host had me add this to my custom code that did nothing.  although maybe it takes longer to time out hehe

    <IfModule mod_dtimeout.c>
    <Files ~ ".php">
    SetEnv DynamicTimeout 300
    </Files>
    </IfModule>

    The security log shows absolutely nothing related to this.  My main php log shows nothing(as it shouldn’t really). i downloaded WP audit log plugin to see if i could see any weird errors, and it shows that on EVERY attempt to log, that it “successfully” logs in.  regardless if i really did.  that tells me that to WP im in, but something is blocking something(bps is because again, if i disable bps completely, im 100% fine every where)

    So today for testing purposes, i created another user to login.  I looked at my cpanel error log and i get this, Timeout waiting for output from CGI script /home/<Site name>/public_html/index.php, when i log in locally, and i dont get it the instances where i can get in via a proxy.  i have not disabled yet the “directory…” that is recommended for a 500 error, but at least im getting closer to figuring out this weird problem!

    #28805

    AITpro Admin
    Keymaster

    Do the standard BPS troubleshooting steps and let me know which BPS Security feature is causing the problem: http://forum.ait-pro.com/forums/topic/read-me-first-free/#bps-free-general-troubleshooting.

    The BPS plugin has built-in troubleshooting capability and should not be deactivated for troubleshooting.  Deactivating BPS removes the built-in troubleshooting tools/capabilities.  You can turn all BPS security features On or Off for troubleshooting to isolate exactly which BPS security feature is causing an issue/problem or to confirm or eliminate BPS as the cause of an issue/problem.

    Note:  After doing each troubleshooting step, test whatever is not working to see if it is now working.  It could also be possible that 2 things are causing a problem.  Example scenario:  Doing step 2 and step 3 allow whatever was not working to start working.  That would mean both the root .htaccess file and the wp-admin .htaccess file are blocking something legitimate.

    #28806

    AJ
    Participant

    I thought I did…hehe  but I did all the external steps first I guess….  did not do the internal steps.

    So i disabled all the features in BPS that i had turned on, and it logged in perfectly. 🙂

    I turned them all on one by one, and the one that is the culprit is…. “Login & Security Monitoring” , turning it off/on.  If i turn it off, i can log in perfectly, and on=504 gateway timeout..  I tried reading up on it before i posted this, but I still don’t see a solution.  I have no errors in the BPS security log related to this.  And the fact that via some weird proxy it works 50% of the time….

    I appreciate the nudgings that have gotten me to this point!

    #28808

    AITpro Admin
    Keymaster

    Ok great.  Now change this Login Security setting > Logging Options > Log All Account Logins and try to login to your site and let me know what happens.  Also post these fields from the Login Status table entry for the login attempt you are going to try:  IP Address > Hostname > Request URI.  If the fields are blank due to the login failing then let me know that.  Also you should NEVER log into your website with a free Proxy.  If you have a paid VPN/Proxy that you purchased and is installed on your computer then it is safe to use that paid VPN/Proxy.  It is not safe to use free VPN’s/Proxies to log into ANY accounts:  WordPress, Banks, etc.

    #28809

    AJ
    Participant

    i did that before you asked! 🙂

    so i created another admin account, so i would not have to log in and out on with proxy.  I get the same issues with new user.  So when i try to log in, I get the gateway error. but this time in the login security table at the bottom, Iget a entry for each attempt I try to log in.  which in my case is 3 times/entries.  My actual IP and Hostname are shown and are the same.  and my request url is my “Rename-wp login” plugin path, which was   /igloos/      I even got a email for my 3 attempts that say, “An Administrator Has Logged in”

    just as another test, i disabled just the rename wp-login plugin,  tried to log in, and received the same 504 error, and that login security table entry is still the same except the request field shows  /wp-login.php

    (and I understand fully the dangers of proxy. this is a paid proxy.  which i still dont trust, but ill never fully trust a proxy/vpn.  paranoid.  🙂 )

    #28810

    AITpro Admin
    Keymaster

    hmm ok well I have looked at the BPS Login Security code and I cannot see anything that needs to be fixed or changed in the code that would make any difference in this scenario.  So I guess you will either not be able to use BPS Login Security on this site or will have to use whatever login method works.  The problem seems to be on your end somewhere like something installed on your computer or in your Browser (add-on, extension, etc).  Similar to this type of problem with LastPass:  http://forum.ait-pro.com/forums/topic/lastpass-password-manager-unable-to-login/  Maybe try a different Browser and disable/deactivate all Browser add-ons/extensions.

    #28811

    AJ
    Participant

    bummer!  So I i tried another base machine on my network in basic google browser and still get the same error.  Which leads me to believe its not my individual machine.  Which leaves(vaguely) my router, my isp, my host.  I appreciate that at least I have “a” solution at the moment, but i will figure this out.  the fact it just started randomly one day, leads me to think its probably not my router.  I will update this thread once I figure this out.

    #28812

    AITpro Admin
    Keymaster

    Yep, least likely cause would be your Router and you can do a straight CAT5 cable connect to test that.  Most likely cause is your ISP since you were able to login from other devices that were not being routed through your ISP connection.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.