Remote server return an error (502) Bad Gateway

Hi Team,

This is regarding eRS integration.
When we try to retrieve a few specialities together, we receive an error

Remote server return an error (502) Bad Gateway.

We tried to increase the timeout settings from our end, but no luck

This is in live environment.

Any ideas how can we increase the timeout settings? Or is there anything NHSe can do from its end?

Thanks in advance.

Hi,

Could you please try this again? If it doesn’t work, please provide the full URI that you were making the request of and the correlation id of the request.

Thanks

Hi tried today at around 2 pm
here is the Correlation ID: 000000000F0FCE538522153029E7EABB

The URI should be
https://api.service.nhs.uk/referrals/FHIR

API is A008

Hi team,
Any update on this?

@v.jaisinghani,

Could you please make another request and provide your Application ID, X-Correlation-ID and the date/time of the request here.

Thanks,

Adam.

Hi Adam,

below are details:

Application name: FHFT - eRS Healthcare Worker - Prod
Application ID: 1eecdd6e-309e-4694-83eb-72f8b7055df2
Date and time of pull: 29/07/2024 at 14:09
Correlation ID: 0000000017CD5B5D8522153029E7EABB

Let me know if you need anthing else.

Thanks @v.jaisinghani.

We can see the reason for the error is that the response payload has exceeded the API Management (APIM) platform 10MB limit. The worklist response would have included 7639 rows.

This limit is documented on A008 - Retrieve referral worklist:

If a worklist response exceeds 10MB, a successful response will not be returned. This is due to the size limitation on the APIM platform.

There is also guidance in the SCAL related to this. I’ve included an extract of the relevant requirements below:

API Category / Requirement Requirement Title Requirement Description Guidance
A008: Retrieve Worklist A008-01 Payload Filtering The solutions API calls MUST be filtered where possible. Filters include Location, Specialty, Service and Clinician The API call MUST filter on specialty and/or location where possible to avoid large payloads. Provider worklists can be large and the maximum payload is set to 10mb.
A008: Retrieve Worklist A008-02 Payload Size The solution MUST monitor payload size. Calls over 10MB will not be returned. The solution MUST monitor payload size to avoid breaching set limits that will lead to the information being inaccessible. The limit is 10mb (which equivalates to approximately 7500 rows). Clinical Consideration: The supplier should work with the end user to understand local worklist management and ensure contingencies are in place should the API call exceed or be close to breaching the allowed limit.

There are two ways to reduce the payload size to avoid this error:

  1. Reduce the overall worklist size by managing the worklist
  2. When querying the worklist filter by Location, Specialty, Service and/or Clinician to reduce the volume of data returned in a single call

Regards,

Adam.

Thanks Adam,

Can you specify how many rows would fit into the 10MB limit?
and is there a way we can increase this limit?
We would like to pull the whole load without any filter.

Thanks

Hi @v.jaisinghani,

Can you specify how many rows would fit into the 10MB limit?
Approximately 7500 rows as per the guidance in A008-02 above.

and is there a way we can increase this limit?
No

Regards,

Adam.