• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

SQL too many connections

Z

ZAPP!?

Guest
Hi!


Does anybody here have an idea about how to advance the max sql connection limit from from 100 to X for only one account and not for the whole server?

ZAPP
 
It can't be done for a single user. I would take a look at the queries that user is executing and turn on slow query logging and try to eliminate the queries with the highest amount of contention.

Tweaking max-connections is often server suicide because each connection has fixed buffers and you can very quickly exceed physical RAM and force the server into swap thrashing. Also keep in mind the less free physical RAM the more the performance of mysql will suffer, because mysql doesn't have it's own buffering mechanism for the database files -- it depends on the OS buffer cache. The OS buffer cache will decrease in size as memory demand increases. It is usually a vicious cycle.

In short, you have to address the query contention issues (which is very common with mysql). If there is a very common table in the web application that is large and many queries are doing full scans then that is likely a potential problem table. I have seen a few cases like this where people were using LIKE to do pattern matching, and the simple solution was to change it to a full text index and use the MATCH() clause.
 
we use a php anti-leech script, mainly for our downloads, so every downloader must have a "sql-connection" until he have finished the download.

ive found a usefull topic right here: http://forum.swsoft.com/showthread.php?s=&threadid=15822


i hope it works! ;)

edit:
here's the proof:
test22pl3.jpg
 
Back
Top