MySQL ERROR 1040: Difference between revisions
(Created page with "=MySQL error 1040: Too many connections= {{KB|{{ZC}}|{{ZCS 8.8}}|{{ZCS 8.7}}||}} {{WIP}} ==Problem== This specific error can manifest during different circumstances. Below...") |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
That specific error can manifest during different circumstances. Below are two examples of such occurrences: | |||
$ /opt/zimbra/libexec/zmdbintegrityreport -r -v | $ /opt/zimbra/libexec/zmdbintegrityreport -r -v | ||
Line 19: | Line 20: | ||
==Resolution== | ==Resolution== | ||
1 | 1. Enter mysql command line: | ||
$ mysql | $ mysql | ||
2. Once inside confirm the current setting: | |||
show variables like "max_connections"; | |||
3. Change the current setting with higher value: | |||
set global max_connections = 200; | |||
4. Restart: | |||
$ mysql.server stop | |||
$ mysql.server start | |||
However after server restart these settings will be gone. | |||
==== To make the change permanent: ==== | |||
1. Edit '''my.cnf''' file and under '''['''mysqld''']''' section change the ''max_connections'' value. | |||
2. Restart: | |||
$ mysql.server stop | |||
$ mysql.server start | |||
'''IMPORTANT''': Increasing the connections will also increase the memory usage on the server. Make sure you have enough resources before applying these changes. | |||
{{Article Footer|Zimbra Collaboration 8.7, 8.8.9, 8.8.12| 7/10/2019}} | {{Article Footer|Zimbra Collaboration 8.7, 8.8.9, 8.8.12| 7/10/2019}} | ||
{{NeedSME|SME1|SME2|COPY EDITOR}} | {{NeedSME|SME1|SME2|COPY EDITOR}} |
Latest revision as of 22:54, 26 September 2019
MySQL error 1040: Too many connections
Problem
That specific error can manifest during different circumstances. Below are two examples of such occurrences:
$ /opt/zimbra/libexec/zmdbintegrityreport -r -v /opt/zimbra/common/bin/mysqlcheck: Got error: 1040: Too many connections when trying to connect
$ /opt/zimbra/bin/zmmysqlstatus ERROR 1040 (HY000): Too many connections Error while running 'mysql --user=zimbra --password=******** --database=zimbra --batch --skip-column-names'. at /opt/zimbra/bin/zmmysqlstatus line 256.
Resolution
1. Enter mysql command line:
$ mysql
2. Once inside confirm the current setting:
show variables like "max_connections";
3. Change the current setting with higher value:
set global max_connections = 200;
4. Restart:
$ mysql.server stop $ mysql.server start
However after server restart these settings will be gone.
To make the change permanent:
1. Edit my.cnf file and under [mysqld] section change the max_connections value.
2. Restart:
$ mysql.server stop $ mysql.server start
IMPORTANT: Increasing the connections will also increase the memory usage on the server. Make sure you have enough resources before applying these changes.