I have an interesting problem. I think I've found an infinite request loop that's causing my istio-proxy to crash with an OOM error in a specific circumstance.
When I submit the request locally to the app directly from inside the application container it seems to work fine and in the istio-proxy logs I see that the upstream_cluster is PassthroughCluster
However when I submit the request through the envoy proxy I'm using for SSL termination (not the istio-proxy for the app/mesh) the request seems to be retried/repeated until the istio-proxy crashes with an OOM; the only upstream_cluster I see in those logs is inbound|80|myapp
Has anyone see something like this before? It seems like the request is being routed to the wrong listener or the envoy-proxy we have sitting in front of the app that's in the mesh is somehow messing up the request.
A few more details about the symptom:
I have just one app in the service mesh and the traffic coming to that app comes from an envoy proxy that's handling SSL termination
Envoy -> (istio-proxy / app ) -> other services
When I send the request directly to localhost from within app it works fine, when I port forward directly to the (istio-proxy / app) pod and issue the request it also appears to work fine. When I send the request through Envoy I start to see thousands of identical requests in the (istio-proxy / app) logs and eventually the istio-proxy crashes with OOM.
kubectl exec -it <pod-name> -c istio-proxy -- curl -X POST http://localhost:15000/logging?level=traceand check istio-proxy logs withkubectl logs <pod-name> -c isitio-proxy -fand provide some logs? If I understand correctly you have ingress-gateway-> envoy -> app with envoy sidecar, why won't you do tls termination on gateway? If you use grpc take a look at this github issue. - Jakubupstream_clusterisPassthroughClusterinstead ofinbound|80|myapp. Is there something more specific I should look for in the logs? - blankenshipz/config_dumpendpoint from the admin server. That would help us understand what the change in cluster truly means. That being said, I have seen something like this before, and it was caused by circular logic in the routing rules; so a route that does a prefix_rewrite or a redirect that causes the request to loop back through all the rules and just continue looping forever. Still could help more with the configs, but that's where I'd look first. - justincely