Connections global server stats variable explanation
MySQL global server stats variable "connections" is explained like this in docs.
Connections
The number of connection attempts (successful or not) to the MySQL server.
Since this number is always growing, where are the failed connections going and why are they not getting tracked? What happens to the failed connections and in our environment, jboss logs show "too many active scans" in its log, but actual connections to the database, as seen from threads_connected is only 30, but max_connections is kept at 1500, and in jboss connection pooling with 2 LB nodes, its set as 500 at each node, but still application get this error, but database doesnt get it. So trying to understand whats happening behind the scenes, while MySQL gets these connections. There are connection attempts, that are successful and some fails, so how does MySQL, even though its able to find that some connections are failing, handle the connections that hit it?