HSP: 502 Proxy Error

167 views
Skip to first unread message

Scott Jefferies

unread,
Feb 21, 2017, 5:45:03 AM2/21/17
to A gathering place for the Open Rail Data community
Hi,

When making requests to the HSP API, I am receiving a 502 Proxy Error. Scripts were running fine previously.

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

Does anyone have any idea why I might be receiving this error?

Peter Hicks

unread,
Feb 21, 2017, 5:46:12 AM2/21/17
to Scott Jefferies, A gathering place for the Open Rail Data community
Hi Scott

Is this a one-off, or happening continually?


Peter


--
You received this message because you are subscribed to the Google Groups "A gathering place for the Open Rail Data community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openraildata-t...@googlegroups.com.
To post to this group, send email to openrail...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Scott Jefferies

unread,
Feb 21, 2017, 5:58:11 AM2/21/17
to A gathering place for the Open Rail Data community
Hi Peter,

I am only an adhoc user, but I have been experiencing the same issue since yesterday morning.

Scott

Peter Hicks (Poggs)

unread,
Feb 21, 2017, 6:10:10 AM2/21/17
to Scott Jefferies, A gathering place for the Open Rail Data community
Hi Scott

> On 21 Feb 2017, at 10:58, Scott Jefferies <scott.j...@ee.co.uk> wrote:
>
> I am only an adhoc user, but I have been experiencing the same issue since yesterday morning.

It may be an issue with the query you’re running - can you post the URL you’re calling? Also, can you try making another, simpler query? This will rule out whether it’s the specific query you’re running, or a separate issue.


Peter


Scott Jefferies

unread,
Feb 21, 2017, 7:12:59 AM2/21/17
to A gathering place for the Open Rail Data community, scott.j...@ee.co.uk
Hi Peter,

A simpler query retrieving Service Metrics for only a few hours on a single day works! I was trying to retrieve a couple of days worth of data for Services between two stations. In your experience should this be possible? I have certainly extracted this amount of data in the past.

Many Thanks,
Scott 

Peter Hicks

unread,
Feb 21, 2017, 7:48:27 AM2/21/17
to Scott Jefferies, A gathering place for the Open Rail Data community
Hi Scott

I don't see why you shouldn't be able to do that kind of longer query.  If it's worked in the past...

It soundsime the query is taking too long to process on the server side and your HTTP connection is timing out.

I've mentioned it to the powers that be and I'll see if I can find out what's happening.


Peter


Matt Felstead

unread,
Feb 26, 2017, 9:04:54 AM2/26/17
to A gathering place for the Open Rail Data community
Afternoon All

I too have been receiving the same error, again from scripts that previously worked fine. The error status is 502 - "The proxy server received an invalid response from an upstream server". I get this response from both the "service metrics" and "service details" API. I've been experiencing this problem since yesterday; I don't know if it'll be resolved by the planned maintenance taking place tomorrow?

Cheers

Matt

Message has been deleted
Message has been deleted

Ian Mackay

unread,
Aug 31, 2018, 9:36:42 AM8/31/18
to A gathering place for the Open Rail Data community

response is:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>502 Proxy Error</title>

</head><body>

<h1>Proxy Error</h1>

<p>The proxy server received an invalid

response from an upstream server.<br />

The proxy server could not handle the request <em><a href="/api/v1/serviceMetrics">POST&nbsp;/api/v1/serviceMetrics</a></em>.<p>

Reason: <strong>Error reading from remote server</strong></p></p>

<hr>

<address>Apache/2.2.15 (CentOS) Server at hsp-prod.rockshore.net Port 443</address>

</body></html>

Peter Hicks

unread,
Aug 31, 2018, 9:38:20 AM8/31/18
to Ian Mackay, A gathering place for the Open Rail Data community
Hi Ian

It sounds like you're asking the server to make database queries for a much larger period of time than it's capable of doing prior to the front-end Apache server timing out.

Try reducing the date range a bit.


Peter

--
You received this message because you are subscribed to the Google Groups "A gathering place for the Open Rail Data community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openraildata-t...@googlegroups.com.
To post to this group, send email to openrail...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


OpenTrainTimes Ltd. registered in England and Wales, company no. 09504022.
Registered office: 13a Davenant Road, Upper Holloway, London N19 3NW

Ian Mackay

unread,
Aug 31, 2018, 11:36:15 AM8/31/18
to A gathering place for the Open Rail Data community
`Hi Peter, thanks for the response, but the same thing happens for a single day:

Body:

{ "from_loc":"HIT", "to_loc":"KGX", "from_time":"0400", "to_time":"2300", "from_date":"2018-04-01", "to_date":"2018-04-01", "days":"WEEKDAY" }


Reply all
Reply to author
Forward
0 new messages