SAP Knowledge Base Article - Public

3154726 - A CDS query view raises timeout or Bad Gateway error

Symptom

A timeout or below error is raised when a CDS query is executed.

or in SAC there following error is raised:

Protocol error: (Protocol): (#502) Bad Gateway’
"502 Bad Gateway: Registered endpoint failed to handle the request"

Environment

SAP S/4Hana 

SAP BW/4Hana

SAP BW 7.x

Reproducing the Issue

Run a CDS query in SAC or via transaction RSRT in BW

Cause

The issue is caused by invalid number range for SID of a characteristic. 

An evidence of that is that in SM50 it is possible to see a Sequential Read of DB in NRIV table.

Resolution

Run the " Compare number range for SID of characteristic" in RSRV transaction (RSRV -> All Elementary Tests -> Master Data) for all characteristics involved in the query to identify which one needs to be fixed.

Use "correct errors" button in to fix those are failing.

Keywords

Nriv, timeout, Gateway, cds view , KBA , BW-BEX-OT-DBIF , Interface to Database , BW4-AE-DBIF , DB Interface Data Manager , Problem

Product

SAP Analytics Cloud all versions