Bug 236554 - mysql server does not honor the default wait_timeout variable.
mysql server does not honor the default wait_timeout variable.
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mysql (Show other bugs)
x86_64 Linux
medium Severity low
: ---
: ---
Assigned To: Tom Lane
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2007-04-16 08:41 EDT by Dragan Milivojevic
Modified: 2013-07-02 23:12 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-28 12:08:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dragan Milivojevic 2007-04-16 08:41:28 EDT
rpm -q mysql-server
Packager    : Red Hat, Inc.

show variables shows that wait_timeout is set at 28800. Actually it is somewhere
10 sec. 

Small test

	require_once ("db.config.php");
	$link = mysql_connect($db_host, $db_username, $db_password) or die("Could not
connect : " . mysql_error() . "\n");
	mysql_select_db($db_name) or die("Could not select database: " . $db_name . "\n");

		$query =  "SHOW tables";
		$result = mysql_query($query);
		$result = mysql_query($query);

the second query bugs out with 
PHP Warning:  mysql_query(): Lost connection to MySQL server during query in
/root/test.php on line 9

If I set the sleep() to a value under 10 seconds everything is fine.

After the wait_timeout has been set in my.cnf everything works as expected.
Comment 1 Tom Lane 2007-04-17 01:33:46 EDT
I can't reproduce this here.  Can't help wondering if it's not a problem with
your networking configuration, rather than mysql per se.
Comment 2 Tom Lane 2008-04-28 12:08:12 EDT
I'm going to close this bug as WORKSFORME.  If you can provide additional information to allow 
reproducing the problem, please reopen.

Note You need to log in before you can comment on or make changes to this bug.