I have a medium sized database (7 GB) with around 200 concurrent users. I am getting some database lag issues, suddenly my node-mysql client freezes during selects and inserts.
As a process of troubleshooting I checked SHOW STATUS
on the DB. Everything seemed to be okay, but the connections
attribute has a value of 262050
.
I want to understand if this number is okay or if the figure is exorbitant?
Best Answer
Server Status Variables
I.e. it is a counter which can increase only. Each attempt to connect to server, both successful and falling, increase it. Each connection, both existing and already broken, is taken into account. So this variable value can be used only for to calculate the average number of connections per some time period.
It is the amount of real external connections in any state. Do not include inner server services connections (sheduler connection, for example).
It is the amount of real connections not in sleeping state, including inner server services connections (sheduler connection, for example).
You can see a correlation between last 2 variables while compare the output of the commands
and