(502) Bad Gateway
Hi,
I am running an external application (developed in Visual Basic) fetching information's from a Rhapsody (8.4) SYSML model and using this information to create and update artefacts/modules in DNG (6.0.6.1) using the OSLC REST API. This has been working fine for a while.
Though, one procedure the Visual Basic application performs, is to query DNG for a large set of artifacts. That procedure is now failing by throwing an exception after ~60 seconds, see below:
"System.Net.WebException occurred
HResult=0x80131509
Message=The remote server returned an error: (502) Bad Gateway.
Source=<Cannot evaluate the exception source>"
Other querying procedures still works, for instance, when querying for an artefact using the URL of the artefact
Can someone advise me what a probable cause and possible solution for the failing query?
Kind Regards
Magnus
|
Accepted answer
Ian Barnard (2.2k●6●13)
| answered Oct 27 '21, 3:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Nov 01 '21, 4:29 a.m. Hi Magnus
If your deployment has a reverse proxy or is using WAS it sounds like this is timing out on what is presumably a lengthy query you're making to DOORS Next. The way a reverse proxy works is to accept the request from your application, create a new request (with the same data) to the target application (DOORS Next), wait (with a timeout) for the response, and when it's received create a response to your application. By working this way you can have a single fronting URL for ELM which the reverse proxy dispatches to different application servers to be serviced, allowing distribution of the load and greatly simplifying reconfiguration of the application servers.
You could ask your IT team to check the configuration of your reverse proxy/WAS to perhaps increase the timeout waiting for response.
You could also consider changing your application to make multiple smaller (i.e. quicker) queries rather than one enormous query.
HTH
Ian
magnus Elfving selected this answer as the correct answer
Comments
magnus Elfving
commented Oct 28 '21, 8:59 a.m.
Thanks Ian.
I have notified the IT team and I will firstly evaluate the effects of change in the settings of timeout.
Using smaller queries; do you mean pagination or some other way to divide a query ?
Magnus
Pagination will still require your server to find and handle the same large number of results albeit delivering them in smaller chunks.
I imagine making smaller queries (divide it into smaller queries) will be more effective.
If you have any further problem with this, create a support case
magnus Elfving
commented Nov 01 '21, 10:06 a.m.
I have now successfully queried DNG with increased setting for time out |
One other answer
The 502 (Bad Gateway) status code indicates that the server while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request. The “proxy server” is a system or router that acts as a gateway between your computer and the internet.
How to fix?
Perform a hard-refresh in your browser. On Macs, this is done by pressing Cmd + Shift + R.
If you are surfing the Web and see this problem for all Web sites you try to visit, then either 1) your ISP has a major equipment failure/overload or 2) there is something wrong with your internal Internet connection e.g. your firewall is not functioning correctly. In the first case, only your ISP can help you. In the second case, you need to fix whatever it is that is preventing you reaching the Internet.
This problem is due to poor IP communication between back-end computers, possibly including the Web server at the site you are trying to visit. Before analysing this problem, you should clear your browser cache completely.
Finally, restart your computer/networking equipment. Some temporary issues with your computer and how it's connecting to your network could be causing 502 Bad gateway errors, especially if you're seeing the error on more than one website. In these cases, a restart would help.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.