Does the TLS handler close idle TCP connections after 60s?

I’m playing around with running an MQTT broker on fly, using the TLS handler on port 10000. Clients seem to get disconnected every 60s, and it seems to be that fly is sending a FIN about 60 seconds after the connection is established.

I assume your proxy is killing “idle” connections. Is this by design? Is the idle timeout configurable?

If I decided I wanted to not use the TLS handler, is there a way I could get the certs/secrets mounted in my container so I can handle TLS termination myself?

Thanks!

60s is our timeout for connections. If nothing in our out has been sent or received through them for 60s, then we close them. This is true of any TCP connection (not just ones using the TLS handler).

You’ll need good reconnection logic or to send “pings” to keep the connection alive. Depending on the type of service you’re exposing, this may or may not be possible.

We don’t presently offer this. We’re hoping our TLS solution can be complete enough that our users won’t need access to the certificates. As I said though, TCP connections would also be closed after 60s of inactivity, even if you handle TLS yourself.

1 Like

Thanks - that makes sense, although I’m now confused about how this used to work (I just ran the broker on a VPS and had no issues with a keepalive > 60s).

I’ll update the client config.

I have a long connection that sends gRPC keepalive packets every 30 seconds. However this connection is still being cut after 60s. Do gRPC keepalive packets count as non idle?

They should, yes.

Can you disclose the app name or hint at which app it might be? I can take a look at our logs / traces to see what’s happening.

Yes so its 2 fly apps communicating with each other. One is called data-app that initiates the request to another app called temporal.
I just tried the request again at about 12:02 PM pacific time (PST)

I’ve been testing with tcpdump and can see traffic between the 2 nodes in question at less than a 60 sec interval so a little confused.