You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to set up a streaming endpoint that is potentially very low throughput. I'm finding that with Nginx as a reverse proxy, if I don't send a message for 60 seconds, the connection is killed. I was hoping to use some of the keepalive settings to maintain the connection but I haven't been having any luck.
My code:
let endpoint = Endpoint::from_static("https://[redacted]")
.keep_alive_while_idle(true)
.keep_alive_timeout(Duration::from_secs(5))
.tcp_keepalive(Some(Duration::from_secs(5)));
let mut client = HandlerClient::connect(endpoint).await?;
With tcpdump I can confirm there's no activity at all other than the actual messages. I don't see any keepalive stuff happening, and after 60 seconds the connection times out.
Is there anything else I need to configure for this to work?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm trying to set up a streaming endpoint that is potentially very low throughput. I'm finding that with Nginx as a reverse proxy, if I don't send a message for 60 seconds, the connection is killed. I was hoping to use some of the keepalive settings to maintain the connection but I haven't been having any luck.
My code:
With
tcpdump
I can confirm there's no activity at all other than the actual messages. I don't see any keepalive stuff happening, and after 60 seconds the connection times out.Is there anything else I need to configure for this to work?
Beta Was this translation helpful? Give feedback.
All reactions