• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Bad Gateway The proxy server received an invalid response from an upstream server

 
Greenhorn
Posts: 9
Postgres Database Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting the following error, while accessing the site hosted in Microsoft Azure Virtual Server after waiting for few minutes.



502 Bad Gateway The proxy server received an invalid response from an upstream server.



**The most confusing part is that, if we refresh the page, it works perfectly fine and loads very fast**



The following is the configuration:





Apache workers conf:





The following is the lines from the log file




 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that there's 2 primary ways to get that message. One is when you're confusing SSL and non-SSL on the proxy channel.

The other would be what appears to be hurting you. It looks like the handshaking is failing due to timeouts.

Check the VM and Tomcat to ensure that you have enough memory allocated. If the VM paging rate is high, timeouts are a consequence.

You can also have timeouts if the VM itself is being starved of resources, but that's a lot harder to diagnose from an internal point of view.
 
reply
    Bookmark Topic Watch Topic
  • New Topic