• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

MySQL Connection are to high?

P

PixyPumpkin

Guest
Last week I received two error messages on MySQL that there where to many SQL connections. I run CentOS 3 with Plesk 7.5.4. The logfiles only show the nomal MySQL traffic nothing uncommon. What are probable causes on this high number of connections that makes MySQL temporarily not available? How can I solve this? Raise the number of possible connections? Run more servers? Is there software to monitor or analyse MySQL and SQL Connections more closely?

Thx in advance! :)
 
Where can I raise the MySQL GLOBAL max_connections in Plesk? It seems that the setting in the /etc/my.cnf is overruled by Plesk?
 
What did you do exactly? SWsoft also says to edit /etc/my.cnf in their knowledge base. Just add set-variable=max_connections=500 in the [mysqld] section and restart mysqld.
 
The setting in ect/my.cnf is on 500 but still MySQL say's 100 :(
 
Did you literally set set-variable=max_connections=500 under [mysqld] in /etc/my.cnf and did you restart mysqld afterwards? Where do you see it's 100?
 
If I login to MySQL and ask show variables it show me the GLOBAL max_connections and tells me it is 100, I can put it on 200 here but after a reboot it will be back on 100 :( I found some other topics on this, I have to analyse them still.
 
When I change /etc/my.cnf like I described in my previous post, restart mysqld and then login and run show variables I see max_connections is set to 500. No problems here, works just fine.
 
I wouldn't just go in and bump max connections, increasing this value too high will cause your server to start swapping due to the memory requires *each* client requires.

I have worked on domains that are doing 50 qps where the person did the same thing and brought his entire domain to a halt, and if you properly tune all of your queries you can live with 128 connections without a single issue. After tuning it was doing 100~150 qps.

What I would recommend is setting thread_cache_size to 100, this will reduce a significant amount of system CPU time due to creation/destruction of threads -- which ultimately slows down how many connections can come & go because they have to wait for their thread to be created.

In general I would suspect your issue is related to the queries not having proper indexes, or simply the wrong queries (cartesian products, improper schema design, etc).

I have worked on quite a few servers and rarely found max_connections to be a solution, but more of a problem. As the end result is thrashing due to excessive swapping.
 
Back
Top