Increase the Max SQL connections per user
Hello,
A user hosted on my VPS experience the Max SQL connection error, especially when they advertise on social media, and they lead some increased audience on the website.
I tried to run
mysql -u {username} -p {password} from terminal, I'm asked to enter a password, I enter the database password but i receive this error:
ERROR 1045 (28000): Access denied for user 'woodandgasleb'@'localhost' (using password: YES)
Also I tried to use the new cPanel feature SQL Services > Edit SQL Configuration
I increased the "Max Connections" from 500 to 600. Is this enough to prevent the randomly appearing error when we open the website ?
-
Hello there! It's difficult to know whether 600 will be a high enough value for the max_connections since this would depend on the amount of traffic the site receives and the demands of the site/database. It is best to make small changes to the max_connections and monitor the site/MySQL error log to determine if further changes are needed, as making a very large increase to the value could cause the server to become unstable. 0 -
Hello there! It's difficult to know whether 600 will be a high enough value for the max_connections since this would depend on the amount of traffic the site receives and the demands of the site/database. It is best to make small changes to the max_connections and monitor the site/MySQL error log to determine if further changes are needed, as making a very large increase to the value could cause the server to become unstable.
- How can I increase the max sql connection per user ?
- How can I know the max sql connection needed per user ?
- Adjusting the "Max Connections" in Services > Edit SQL Configuration, is the right thing to fix the problem ?
0 -
No, there is no "per user" option for this setting in a default MySQL configuration. 0 -
Anyone found any solution for this? As I am also looking for one such option? 0 -
Anyone found any solution for this? As I am also looking for one such option?
Since implementing Cloudflare 3 months ago, I didn't have a Max SQL connections error0 -
Since implementing Cloudflare 3 months ago, I didn't have a Max SQL connections error
I already have Cloudflare and still face it 2-3 times a week0 -
@Saket Jajodia - it's possible your server is just that busy and you may need to optimize MySQL on the system. I'd start by checking the main error log for MySQL and see if that is reporting the max connections error being reached. If so, you could increase the number of available connections through the /etc/my.cnf file on the machine. 0
Please sign in to leave a comment.
Comments
9 comments