WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: WordPress HTTPS (SSL)] 502 Proxy Error

[Resolved] [Plugin: WordPress HTTPS (SSL)] 502 Proxy Error

  • I have random 502 proxy errors after activating this plugin.

    Proxy Error
    
    The proxy server received an invalid response from an upstream server.
    The proxy server could not handle the request GET /.
    
    Reason: Error reading from remote server

    This is inconsistent behavior and does not happen on every page load. It ceases to happen when I deactivate the plugin.

    This appears to be a request time out issue. But I am unsure what could be causing it.

    It is not a new bug with the new release. It was happening before as well.

    http://wordpress.org/extend/plugins/wordpress-https/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author Mike Ems

    @mvied

    Hey timbunch,

    If not on every page load, how often?
    When it happens, how long does it take for the server to respond (does it hang)?
    Does it occur on both HTTPS and HTTP pages?

    Thanks,
    Mike

    Hi Mike!

    It occurs randomly, sometimes repeatedly. On average, I’d say 1 in 20 page loads. However, when it starts to time out, it sort of gets hung like the server is busy.

    The server is definitely taking too long to respond, which I assume is why I’m getting the 502. The only requests I’m sending are to Google for a font download and analytics.

    It does appear to only happen on SSL pages.

    Also, this issue is browser independent. When it begins to hang up, it hangs up across the board. Likewise, when it clears up, it clears up across the board.

    Rackspace Cloud Sites is the host.

    It seems to be buggy in that sense.

    This is in my php errors log.

    [28-Nov-2011 18:28:10] PHP Warning:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in .../wp-content/plugins/wordpress-https/wordpress-https.php on line 629

    Plugin Author Mike Ems

    @mvied

    Hey timbunch,

    And if you refresh a HTTPS page with the plugin disabled, it never occurs?

    A 502 error is going to occur way before any assets like JavaScript or CSS are requested, so it’s definitely not hanging while loading the site itself. The error is occurring somewhere on the hosts end. It generally comes from a a proxy server losing connection with the server it’s proxying. Sometimes servers go through multiple proxies and if there is a connection loss anywhere in the chain, the error will occur. I’m pretty sure if it times out, you’ll get 504 error instead.

    Thanks,
    Mike

    I have yet to get the 502 error with the plugin disabled.

    If the page is not pulling up, I can disable the plug in, hit refresh and the page will come up immediately. Then I can immediately re-enable the plugin and get the 502 error.

    It is bizarre to me also. With rackspace, a time out will usually say something like “no nodes available”.

    Any ideas on that php error in my log?

    Plugin Author Mike Ems

    @mvied

    Hey timbunch,

    Is it on pages that are being forced to HTTPS with the plugin? Can you get the error to occur on an HTTPS page that’s not using Force SSL?

    As for the warning in the error log, that’s not going to cause any problems. The in_array function will produce that warning if the second argument is an empty array. I should probably suppress that warning since it’s pretty likely that that array will be empty.

    Thanks,
    Mike

    It only occurs on pages where HTTPS is forced. HTTP pages pull up fine while the HTTPS pages give me a 502.

    Plugin Author Mike Ems

    @mvied

    Hey timbunch,

    What about HTTPS pages that aren’t forced to HTTPS?

    Thanks,
    Mike

    I f I disable Force SSL Exclusively, I can successfully load the non-forced SSL pages as either HTTP or HTTPS (While the forced SSL pages are hanging). Good question.

    Plugin Author Mike Ems

    @mvied

    Hey timbunch,

    Would you mind if I poked around with the plugin on your site? If not, I can tell you what steps to take to get the information I need, but it’ll only take me a few minutes.

    Thanks,
    Mike

    I could provide some temporary access to the backend of the dev site. What’s your email address?

    Plugin Author Mike Ems

    @mvied

    Oh right, that’s important, huh? 😛

    mike[at]mvied[dot]com

    Plugin Author Mike Ems

    @mvied

    Hey timbunch,

    Your SSL Host is using a proxy that is not configured properly. The plugin (and WordPress) can never detect that the page is HTTPS, so it can’t function properly. I’ve seen this on other users’ sites and generally when this happens, pages that are forced to HTTPS go into a redirect loop because the plugin continuously tries to redirect to HTTPS since it doesn’t think that the page is HTTPS. I imagine that the redirect loop error never makes it through the proxy so it appears to hang and you get a 502 error.

    Unfortunately, there’s nothing I can do about that. If the plugin can’t detect the page is HTTPS, the plugin simply can’t function properly. Perhaps you can ask your hosting provider to take a look at it.

    Thanks,
    Mike

    That makes sense to me. I will approach it from that angle. You’ve built a top tier plugin for WordPress, and I truly appreciate the support you provide.

    I am having a 502 proxy error only in the admin but seems very much like what you are dealing with. I am using this in wp-config: define(‘FORCE_SSL_ADMIN’, true);

    its intermitent and i am using rackspace cloud sites as well.

    Did you solve this? If so what did you do, I’m desperate.

    Thanks

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Resolved] [Plugin: WordPress HTTPS (SSL)] 502 Proxy Error’ is closed to new replies.