Tracking Open Connections of Services on Linux

In almost every programming language, you can quickly run into problems that the app establishes connections but never closes them. Some programming languages ​​” automatically” close unused connections, and this sometimes works better, sometimes worse. It is good practice to monitor if the “promises” of the vendors do work. Such open connections (I/O, databases, net/HTTP requests, etc.) accumulate over time until there are no more free connections. Boom, in simple words: the app stopped working. The annoying thing is that the app may not crash (depending on your error handling!), it just often can’t establish new connections and doesn’t work as expected. ...

July 3, 2022 · 2 min