Results 1 to 12 of 12
  1. #1

    MYSQL Connection

    Hello !

    Server detail : Centos + Directadmin / Xeon - 2GB Ram

    i have only 1 website on the server & around 300 visitors online at the same time !

    Sometimes a MYSQL warning appears on the index page !

    is there any limit for MYSQL connection ? as i told we have only one website on the server and it`s possible to increase the MySQL connections !!

  2. #2
    Check /etc/my.cnf and paste the contents here.

  3. #3
    Quote Originally Posted by InstaCarma_Support View Post
    Check /etc/my.cnf and paste the contents here.
    Hello !


    [[email protected] etc]# cat my.cnf
    [mysqld]
    local-infile=0
    [[email protected] etc]#

  4. #4
    Join Date
    Jun 2007
    Location
    Manila
    Posts
    150
    Well for a 300 concurrent visitors it well is not your MySQL. What does your website do? Try disabling persistent connections from your code.

  5. #5
    Quote Originally Posted by zoticaic View Post
    Well for a 300 concurrent visitors it well is not your MySQL. What does your website do? Try disabling persistent connections from your code.
    That`s a Book shop ! let me know what to do

  6. #6
    What kind of mysql warning comes on the site ? That will help us to let you know what needs to be done.
    www.24x7servermanagement.com
    Server Management, Server Security, Server Monitoring.
    India's Leading Managed Service Provider !! Skype: techs24x7

  7. #7
    Quote Originally Posted by Srv24x7 View Post
    What kind of mysql warning comes on the site ? That will help us to let you know what needs to be done.
    Sometimes website doesn`t load
    and sometime an error with out any content

  8. #8
    You can increase the max_connections by adding the below line under "[mysqld]" section in /etc/my.cnf file.

    max_connections=320

    Then restart mysql.
    NOTE :: Usually the default value is about 100, increasing it above 300 may increase load and hang up your server.

  9. #9
    Quote Originally Posted by root24x7 View Post
    You can increase the max_connections by adding the below line under "[mysqld]" section in /etc/my.cnf file.

    max_connections=320

    Then restart mysql.
    NOTE :: Usually the default value is about 100, increasing it above 300 may increase load and hang up your server.

    just let me know , is it correct ?

    [[email protected] etc]# cat my.cnf
    [mysqld]
    max_connections=320
    local-infile=0
    [[email protected] etc]#

  10. #10
    Join Date
    Nov 2000
    Posts
    374
    Yes, that looks right. Any better?

  11. #11
    Join Date
    Jul 2009
    Location
    India
    Posts
    42
    one more thing will help your server that is wait_timeout in my.cnf. If your script runs small query multiple times then this limit should be 60 seconds and if your script runs big queries countable times then this limit should be higher.

    now you have ti decide the limit according to your script.

    entry will be same as max_connections.

    let us know if it helps or not.
    ServerManagementAdmins -- Expert in Server Management, Server Hardening & Server Optimization.
    https://www.servermanagementadmins.com
    Server Management Company
    IM (skype): servermanagementadmins Email: sales[at]servermanagementadmins[dot]com

  12. #12
    Yes it's correct. You will have to restart mysql service for this new setting to take effect.

    Quote Originally Posted by jestin_virtual View Post
    just let me know , is it correct ?

    [[email protected] etc]# cat my.cnf
    [mysqld]
    max_connections=320
    local-infile=0
    [[email protected] etc]#

Similar Threads

  1. slow connection on 2 mysql connection. After php4.3.10?
    By 8998 in forum Hosting Security and Technology
    Replies: 0
    Last Post: 12-26-2004, 12:01 PM
  2. too many connection on mysql
    By naguib2000 in forum Hosting Security and Technology
    Replies: 2
    Last Post: 05-12-2004, 06:03 AM
  3. RH 8.0 and MySQL connection
    By Richard Tan in forum Programming Discussion
    Replies: 1
    Last Post: 10-22-2002, 07:56 AM
  4. Help! MySQL Connection Problem (mysql.sock)
    By raylin in forum Dedicated Server
    Replies: 3
    Last Post: 04-16-2001, 06:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •