1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

SQL too many connections

Discussion in 'Plesk for Linux - 8.x and Older' started by ZAPP!?, Aug 23, 2006.

  1. ZAPP!?

    ZAPP!? Guest

    0
     
    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
     
  2. wagnerch

    wagnerch Guest

    0
     
    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.
     
  3. ZAPP!?

    ZAPP!? Guest

    0
     
    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:
    [​IMG]
     
Loading...