502 error in Tyk Gateway

Last updated: 1 minute read.

Description

Users receive a 502 error in the Gateway.

Cause

The Gateway received an invalid response from the upstream server. There are number of different configuration settings that could bring about this issue.

Solution

Try using the following settings in your tyk.conf file:

enable_detailed_recording: false, 
enable_jsvm: false,

And the following key-value pairs should be set in the relevant API definition:

proxy.service_discovery.use_nested_query = false
proxy.service_discovery.use_target_list = true
proxy.service_discovery.endpoint_returns_list = true
proxy.service_discovery.data_path = ""Address”
proxy.service_discovery.port_data_path = “ServicePort""

See Tyk Gateway configuration and Tyk Gateway API for further information regarding API definition settings.