This message was deleted.
# k3s
a
This message was deleted.
c
There is no caching built in to the golang dns resolver. If you use a hostname in an address, it will look it up every time it needs to connect to it.
Use the ip instead, or use a local cache on your node (nscd, systemd-resolved, or the like).
q
Still, doesn't that imply that the server creates a new connection 35000 times over 14 hours? That means every connection has a lifetime of between 1 and 2 seconds, which seems awfully wasteful?
c
it is up to the postgres sql driver to pool connections. but yes that does suggest it is opening and closing connections frequently.
q
I see there is already an issue for it, open since 2020 🙁 : https://github.com/k3s-io/kine/issues/63