Delay on first request

Hello everyone, I have a simple setup with a host and client, where the host has a GET route which just returns some text.
The client uses the python SDK with monkeypatching, here’s the code :

“import os
import openziti
import requests

ztx = openziti.load("ziti/identity.json")
if ztx is None:
raise RuntimeError("Identity load failed")

openziti.monkeypatch()

resp = requests.get("http://winpreprod.zpix:2612/pix/out/v1.0/GetToken")
print(resp.status_code)
print(resp.text)

The code works as expected and returns the intended response, but there is roughly a 10-second delay before the first response. When making multiple requests in a row (with a for loop before requests.get), the same ~10-second delay occurs only for the first request, while all subsequent responses arrive instantly. It seems to me that the delay is caused by the initial setup of the Ziti tunnel, but I don’t have any idea on why it’s the case.

I also can’t manage to have the logs printed with the Python SDK, even when setting ZITI_LOG_LEVEL=debug, so I don’t have more infos.

Any help would be greatly appreciated

Do you get a better result with the context manager approach shown in this requests example?

correct environment variable is ZITI_LOG, and it is numeric -- 1 -> ERROR, 2 -> WARN, etc