Documentation Documentation

502 error in Tyk Gateway


Users receive a 502 error in the Gateway.


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


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""

Further details on Gateway configuration settings can be found at this link and further information regarding API definition settings can be found here.