Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 236554 - mysql server does not honor the default wait_timeout variable.
Summary: mysql server does not honor the default wait_timeout variable.
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mysql
Version: 5.0
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: ---
: ---
Assignee: Tom Lane
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-16 12:41 UTC by Dragan Milivojevic
Modified: 2013-07-03 03:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-28 16:08:12 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Dragan Milivojevic 2007-04-16 12:41:28 UTC
rpm -q mysql-server
mysql-server-5.0.22-2.1
Packager    : Red Hat, Inc.

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

Small test

<?php
	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);
		sleep(10);
		$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 05:33:46 UTC
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 16:08:12 UTC
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.