Goto webmin,
open mysql database
execute sql tab
to view no of connections:
show global variables like '%connections%'
to up the connections
IF YOU HAVE TOO MANY PROCESSES LINGERING AROUND ON THE DATABASE SERVER, THEN YOU MAY REACH A LIMIT AND NO NEW ONES WILL BE ALLOWED TO BE STARTED.
To see if this is the case, take a look at your processes from the MySQL Monitor prompt by typing:
show processlist;
To see how long timeout is on connections vbefore returning to pool
SHOW SESSION VARIABLES LIKE 'wait_timeout';
Count processes:
SELECT COUNT(*) FROM information_schema.PROCESSLIST;
Count sleep processes
SELECT COUNT(*) FROM information_schema.PROCESSLIST where command = "Sleep"
by db (best sql)
SELECT db, COUNT(*) FROM information_schema.PROCESSLIST where command = "Sleep" group by db
YOu can reduce the wait_timeout to 10 mins
SET GLOBAL wait_timeout = 180;
POSSIBLE SOLUTION UPPED server.xml maxConnections="25000" from maxConnections="17000"
NOTE
- so although the db can except 50000 connections i found a limit in tomcat on one server to 1700
- total count on db was 1698
- so i think this was the issue
- as only on one erver this makes sense as a min ago hyde got the error but i didnt
FROM LAYERSHIFT
The number of processes that can be opened are limited by Max_user_connections. And it seems to have been reached.
It's set to 2990 and to change this limit you need to set in in my.cnf file value "max_user_connections = " and restart is needed.
You can set this yourself or we can add it for youUNDERSTANDING THREADS AND PROCESSES AND CONNECTIONS
- MySQL server is a single process application.
- It is multithreaded.
- It accepts connections like TCP/IP server.
- Each connection gets a thread.
- These threads are sometimes named processes, and sometimes they're referred to as connections.
FIND PID for tomcat - simply run - top
dump threads jstack -l PID > file location