By mxmxmktg
My db is giving a “too many connections” error so I need to increase the max number of connections. What (and what path) is the file that I need to modify?
I have searched the topics and submitted a support ticket… but nothing.
This is an excerpt of my error log: 2019/12/13 20:13:02 [error] [exception.CDbException] SQLSTATE[HY000] [2006] MySQL server has gone away 2019/12/13 20:13:02 [error] [application] CDbConnection failed to open the DB connection. 2019/12/13 20:13:02 [error] [exception.CDbException] SQLSTATE[HY000] [1040] Too many connections
Thank you!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @mxmxmktg,
There are a bunch of different reasons for the “Too Many Connections” error.
Check out this FAQ page on MySQL.com: http://dev.mysql.com/doc/refman/5.7/en/too-many-connections.html
Check your /etc/my.cnf file for “max_connections”. If none exist try:
[mysqld]
set-variable=max_connections=250
However the default is 151, so you should be okay.
Other problems to look out for is the use of persistent connections and running out of diskspace.
Regards, KDSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.