Re: Persistant Connections and max_connections on mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	Hi,

    This is a database issue and has to do with the following mysql variables:

    interactive_timeout
    wait_timeout

    By default these variables are set to 28800 and they represent the time for which
the server waits on "persistent" connection.
    If you have a busy site that number is way too big; so try to decrease
those variables and you should be fine:

    mysql> set global interactive_timeout = 120;
    mysql> set global wait_timeout = 120;

    This makes the timeout on connections 2 minutes after which mysql disconects the user
and so freeing usable space for new connections.
    You can also add them in my.cnf so that the server gets them when started:

    set-variable = intercative_timeout=120
    set-variable = wait_timeout=120


Cheers,
Catalin


Dan Rossi wrote:
> Hi there, I have run into issues on a public production server where I
> keep running into max connection issues on mysql if I am using peristant
> connections. Sometimes the machine gets high traffic and I was wondering
> if there are good reasons to leave them on or off. After turning them
> off its been ok for one of the sites/projects. The mysql setting was
> originally 100 I got the bumped up to 500 but still the same issue ?
> 
> Let me know.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux