Open AbdallahR99 opened 1 week ago
YARP uses an ActivityTimeout
with a 100-second default on all requests.
See https://microsoft.github.io/reverse-proxy/articles/http-client-config.html#httprequest
The way to avoid it triggering for long-lived requests like WebSockets is to enable keep-alive/ping mechanisms.
@MihaZupan modified the ActivityTimeout
and still facing the same issue
tried also to override the keep-alive
in the headers and nothing changed
You're seeing messages about The WebSocket connection was closed after being idle longer than the Activity Timeout.
after two minutes even after increasing the timeout?
Are you able to create a small runnable repro?
Keep-Alive headers won't affect this. What I was referring to are actual periodic pings sent by the WebSocket client and/or server. E.g. if the client is using ClientWebSocket
, you can change the KeepAliveInterval
.
When I connect to the web socket through the original site, there is no problem in connecting and it lasts for a long time
But when I connect through YARP reverse proxy , this error appears after around 2 minutes:
I also noticed that yarp receive the ws calls as http