httpx.ReadError inside activity

I have an activity which uses httpx.AsyncClient то fetch external data. Response data is about 100kB, not great, not terrible.

If i start this activity on the local machine everything is good. I get the response.

If i start it inside kubernetes pod with worker - i get httpx.ReadError, but not immediately (i use otel interceptor and i see that part of response body has been read).

The strange thing is that without worker i can easily fetch it from the same POD.

Looks like workers event loop closes TCP or something, but again, everything is fine with temporal locally.

Any advice?

In my case the problem was caused by from temporalio.contrib.opentelemetry import TracingInterceptor and our custom httpx instrumenting. Nothing to do with temporal sdk.