1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to increase the number of connections Mysql

Discussion in 'MySQL' started by the zoo keeper, Jun 24, 2007.

  1. #1
    Hello

    im currently running a website which is getting inexcess of 10,000 hits an hour from both real users and Googlebots (had 150,000 GB hits last week alone!) of late i have started running into database issues.

    I often go to the site and get an error message saying something like 'cannot connect to sel too many connections' i need to get this fixed as it is losing my site business.

    I have mysql 4.1 running does anyone know how i can increase the maxium no of connections, i run the site from a 2.4 dual xeon dedicated with 1gb ram so i have plenty of resources to hike it right up.

    any help or if you could point me to a guide would be most welcome


    thanks,
    carl
     
    the zoo keeper, Jun 24, 2007 IP
  2. Clark Kent

    Clark Kent Guest

    Messages:
    122
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Add max_connections to your my.ini or my.cnf
    Sample:
    [mysqld]
    # The maximum amount of concurrent sessions the MySQL server will
    # allow. One of these connections will be reserved for a user with
    # SUPER privileges to allow the administrator to login even if the
    # connection limit has been reached.
    max_connections=100
     
    Clark Kent, Jun 25, 2007 IP
  3. phpl33t

    phpl33t Banned

    Messages:
    456
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I would recommend letting your web host do that for you. In fact, ask them to optimize your my.cnf for you, based on your server's resources.
     
    phpl33t, Jun 25, 2007 IP