MySQL numfiles problem [message #33813] |
Wed, 12 November 2008 12:24  |
ukexi
Messages: 4 Registered: November 2008
|
Junior Member |
|
|
Hallo,
I've got an very annoying problem with my MySQL-database. After accessing some tables, the system doesn't close the filehandles. This causes numfile to ascend (every table = two open files).
On a physical server (Debian 4.0 - fresh install) the filehandles are closed within two or three minutes. On the virtual server (Debian 4.0 - freh install) the filehandles stay open.
The configs /etc/mysql/my.cnf are the same on both systems. I shutdown the webserver for exclude this as a problem.
Actually, I have 1000 opened files on an unused MySQL-Database!
Quote: |
lsof | grep web0
mysqld 24115 mysql 100u REG 0,222 1024 286408764 /var/lib/mysql/usr_web0_1/asdfasdf.MYI
mysqld 24115 mysql 101u REG 0,222 40 286408766 /var/lib/mysql/usr_web0_1/asdfasdf.MYD
|
Testscript (php5 -f test.php):
Quote: |
<?php
error_reporting(E_ALL);
$c = mysql_connect("localhost","root","PASSWORD");
mysql_selectdb("usr_web0_1");
$d = mysql_query("select * from asdfasdf");
echo mysql_num_rows($d);
mysql_close($c);
?>
|
|
|
|