Too many connections error

Discussion in 'MySQL' started by Aceday, Mar 28, 2007.

  1. #1
    Whats the best way to optimize a server to handle many simultaneous connections to mysql? I have a good server with 2gb ram and a high end processor, I really need it to be able to handle at least 100 simultaneous connections, but it seems to crash if it hits that number. :(
     
    Aceday, Mar 28, 2007 IP
  2. ruby

    ruby Well-Known Member

    Messages:
    1,854
    Likes Received:
    40
    Best Answers:
    1
    Trophy Points:
    125
    #2
    That server should have plenty of grunt. The reason you get that errir is because MySQL (I am assuming you as using MySQL) has a setting called MAX_CONNECTIONS and I am pretty sure the default setting is 100. Up this value to 500 or whatever you need.

    Of course with more connections other settings mught have to be adjusted. Google MAX_CONNECTIONS and you will find info on it.
     
    ruby, Mar 28, 2007 IP
  3. serjio28

    serjio28 Peon

    Messages:
    37
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I got the same issue when my program had loaded a database with queries which required a large time for process. For me this error is indicates that it is a time to revise a logic of work with a database.

    To find out which requests got most of time you can use:
    Actually you can adjust a number of simultaneous connections by edit conf file my.cnf. Just add the line like -
     
    serjio28, Mar 30, 2007 IP