1)To check Max Connections
mysql> show variables like ‘%connections’;
+———————-+——-+
| Variable_name | Value |
+———————-+——-+
| max_connections | 100 |
| max_user_connections | 0 |
+———————-+——-+
2 rows in set (0.63 sec)
Also,
mysql> select user, max_connections, max_updates,max_questions from mysql.user;
+—————–+————-+—————+
| max_connections | max_updates | max_questions |
+—————–+————-+—————+
| 0 | 0 | 0 |
| 0 | 0 | 0 |
| 0 | 0 | 0 |
| 0 | 0 |
This may show something useful.
You could also setup an alert for yourself to warn you, and then find out what is really going on. Use the script below.. change the commands as required..
#!/bin/bash
ALERT_DEST=email.addr@email.add
NUM_PROCESSES=`/usr/local/mysql/bin/mysql -e “show processlist;”|wc -l`
MAX_BEFORE_ALERT=25
if [ ${NUM_PROCESSES} -gt ${MAX_BEFORE_ALERT} ]
then
echo |/usr/bin/mail -s “WARNING: MYSQL CONNECTIONS=${NUM_PROCESSES}” ${ALERT_DEST}
fi
Recent Comments