Need help with resolving intermittent 502 errors

Hello

I am facing an issue with my Kong Gateway setup deployed in db-less mode on Kubernetes. I am intermittently seeing clients receive 502 Bad Gateway errors from Kong Gateway. Even after troubleshooting efforts, I am not able to find the root cause.

I am using Kong version 2.5.3. Kong is deployed in db-less mode on a Kubernetes cluster.

Periodically, clients are receiving 502 Bad Gateway responses from Kong Gateway. This occurs sporadically and doesn’t seem to be directly correlated with high traffic spikes or specific endpoints.

I have Checked Kong logs (kubectl logs) for any obvious errors or warnings during the periods when 502 errors occurred, but found nothing conclusive.

Verified Kong pod health (kubectl get pods -n kong) and confirmed that all Kong instances appear healthy and running.

Restarted Kong pods (kubectl delete pod <pod_name> -n kong) to see if it resolves the issue temporarily, but the problem persists.

My Kubernetes cluster is running with nodes distributed across multiple availability zones.

Kong is exposed externally via a LoadBalancer service type, and I have verified that there are no issues with network connectivity or DNS resolution.

I deployed Kong using Helm (helm install kong kong/ingress -n kong --create-namespace) with custom configurations for HA (replicaCount: 3). Ihave checked https://docs.konghq.com/ rpa documentation but still need help .

I would appreciate any suggestions to help troubleshoot and resolve this issue effectively

Thank you all for your assistance!

Thank you :slightly_smiling_face:
boblewis

Are you able to reproduce the issue, for instance by running curl in a loop? If so you may be able to leverage the debug header to get more info: Debug requests - Kong Gateway | Kong Docs