Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2005
    Posts
    3,448

    Mysql Max_user connections

    Does the max user connectiosn on Mysql actually work?
    set-variable=max_user_connections=10
    I cannot understand it. I have set it to 10 Not matter what i do, i go to a forum hosted on my server and he still has
    Online users:
    189

    Why does mysql doesnt put a limit on the database?

  2. #2
    Join Date
    Sep 2005
    Location
    In canada
    Posts
    3,213
    Quote Originally Posted by nibb
    Does the max user connectiosn on Mysql actually work?
    set-variable=max_user_connections=10
    I cannot understand it. I have set it to 10 Not matter what i do, i go to a forum hosted on my server and he still has
    Online users:
    189

    Why does mysql doesnt put a limit on the database?
    Cause those 189 might not be accessing the forums at same time, those user connections are per second connections, chances of that happening might be low even if it happens only few might see timeout, and still u will see 189 online (thats an average on most forums over 5 minutes timeframe)

  3. #3
    Join Date
    May 2006
    Location
    Florida, USA
    Posts
    362
    max_user_connections = the maximum total concurrent connections to MySQL per user not how many user sessions are online.

    Hope that helps.
    Host, YES!
    Reselling? Partner for profit instead!

  4. #4
    Join Date
    Jun 2005
    Posts
    3,448
    Does someone know why all my.cnf i see on the internet and optimized my.cnf dont have the set-variable=

    My configuration is like this:
    set-variable=max_user_connections=10


    the set-variable is right ?

  5. #5
    Join Date
    Jun 2004
    Location
    Bay Area
    Posts
    1,320
    If i visit your page once, it only has a SQL connection open for 1 second. While the board will say that i'm online for the next 15 minutes.

    10 concurrent SQL connections is a lot, that is 10 people requesting a page at the same time. Try setting it to a lower number if you want to hit the limit.

  6. #6
    Join Date
    Jun 2005
    Posts
    3,448
    I think its actually not reading the limit.
    Could be that something is wrong on my settings. I also see that most my.cnf i see have 100 more option then my. If copy one mysql will not start anymore.
    Here is my current my.cnf

    [mysqld]
    safe-show-database
    innodb_data_file_path=ibdata1:10M:autoextend
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    set-variable=max_connections=300
    set-variable=max_user_connections=10
    set-variable=max_allowed_packet=1M
    set-variable=thread_stack=128K
    set-variable=key_buffer=128M
    set-variable=table_cache=300
    set-variable=record_buffer=8M
    set-variable=back_log=100
    set-variable=thread_cache_size=4
    set-variable=sort_buffer=16M
    set-variable=delayed_insert_timeout=150
    set-variable=interactive_timeout=40
    set-variable=wait_timeout=40
    set-variable=connect_timeout=10


    [mysql.server]
    user=mysql
    basedir=/var/lib

    [safe_mysqld]
    err-log=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid

Posting Permissions

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