MySQL Forums
Forum List  »  Optimizer & Parser

Re: Close conections
Posted by: Rick James
Date: September 21, 2011 11:37PM

There are two timeouts of interest. They specify the number of seconds of inactivity to allow before disconnecting the client.

One deals with humans, which is set to 8 hours by default. Here is how to set it to 1 hour without restarting mysqld:
SET @@GLOBAL.interactive_timeout = 3600;
Alternatively, you could change (or add) the value in my.cnf (my.ini)

For scripts, let's say 30 seconds.
SET @@GLOBAL.wait_timeout = 30;

These will not affect running clients. Rather, the next time a person or script logs in, that value will be copied from GLOBAL to SESSION, and become that clients timeout.

Options: ReplyQuote


Subject
Views
Written By
Posted
3015
July 31, 2011 10:16AM
1439
August 08, 2011 08:51AM
949
September 17, 2011 02:18PM
964
September 18, 2011 12:54PM
1009
September 18, 2011 02:48PM
954
September 19, 2011 07:23PM
886
September 20, 2011 05:40AM
Re: Close conections
1057
September 21, 2011 11:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.