Sidecar maximum content length

Hello! I think i got a problem with sidecar content length.

I have two pods, A and B, pod A receives connections and stream them to pod B on port 80. Pod B have a web interface that shall be exposed that way, via streaming. The problem is the content is being cut, and its limit is 7058 bytes. Is there a way to increase this limit? I only found content about increasing memory, cpu… for the sidecars.

Appreciate your attention .

I never faced that. And to my knowledge there is no limit on body size.

Can you test to connect directly to B and check if the content is correct?
Is A handling correctly chuncked response ?

Tested it and worked fine directly to B.

I wrongly assumed the problem was with the sidecar because I did exactly the same configuration using docker-compose and everything worked fine. Now i just noticed that istio injects some headers and there is also the x-b3 headers I wasn’t using before and maybe that is “breaking” it.

I’ll dive a little more in the stream

Thanks for your reply

What do you mean when you say “streaming” ? Is it HTTP/2 ? GRPC ?
If so, ensure you disabled the “retry policy” on these requests. They may keep the whole transmission in memory in some edge cases (h2 streaming is not supposed to be retied though)… But this have nothing to do with the size limit you are seeing.
Istio does not limit the payload size, so you problem is somewhere else.
Can you give more info on your services, like the protocol used (name of the services’s ports) ?
Which version of Istio ?
What about Envoy’s logs ?


Hello! Just yesterday I figured out my problem, it was in the content-length header, I was passing the header as Content-Length and it seems the sidecar was not able to identify it, when I changed to lower case it worked like a charm.

@prune and @Gregoire, thanks for your time :grin:

Headers are case-insensitive… so if your error comes from the Istio proxy, it’s a bug. If it does come from your application, only you have a bug.
Can you confirm the issue was from Envoy ? What did you see in the logs ?
Also, you are using HTTP1, right (not HTTP/2 or GRPC) ?


The problem was in the app stream, it was only accepting Content-Length and the gateway was passing CONTENT-LENGTH. My bad on identifying the right cause of error