It seems like that go.plugin mysql collector “get a connection - collect info - release the connection” in every collect cycle. I found out that in SHOW PROCESSLIST, user netdata (which I assigned to netdata) has always 0 in time column. IDK why, if this way has better performance?
When you do show processlist; pay attention to the Host field - if it changes it means there is a new connection (e.g.: 172.17.0.1:46860 => 172.17.0.1:46868).
I don’t remember why we set it to 1 minute Can increase it to 5.
yep, I worte a script to verify that, still dont know why mysql keeps saying the connection duration is 0.
But from my personal experience, keeping one single connection is better than creating & releasing connection repeatly in this situation (maybe I’m wrong, if so please correct me)