OpenVZ Forum


Home » General » Support » MySQL numfiles problem
MySQL numfiles problem [message #33813] Wed, 12 November 2008 12:24 Go to next message
ukexi is currently offline  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);
?>


Re: MySQL numfiles problem [message #33814 is a reply to message #33813] Wed, 12 November 2008 14:52 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

seems that is not OpenVZ specific problem.
I was able to reproduce this on a common Linux machine (Fedora 7) (and also on the HN).

Please check if mysql version on the HN and inside the VE are the same.
Are you sure that configuration files are the same?

May you can find anything there
http://forum.swsoft.com/showthread.php?t=35884
Re: MySQL numfiles problem [message #33823 is a reply to message #33814] Thu, 13 November 2008 08:01 Go to previous messageGo to next message
ukexi is currently offline  ukexi
Messages: 4
Registered: November 2008
Junior Member
Version 5.0.32 - problems on virtual server
Version 5.0.51a-1 - no problems on physical server
Version 5.0.51a-7 - problems on virtual server
Version 5.0.67-0 - problems on physical server Sad

Yes, the configs are the same. I checked this with "diff".
Re: MySQL numfiles problem [message #33824 is a reply to message #33814] Thu, 13 November 2008 08:07 Go to previous messageGo to next message
ukexi is currently offline  ukexi
Messages: 4
Registered: November 2008
Junior Member
Btw, I found this thread before posting my problem...
Re: MySQL numfiles problem [message #33853 is a reply to message #33824] Sat, 15 November 2008 09:16 Go to previous messageGo to next message
ukexi is currently offline  ukexi
Messages: 4
Registered: November 2008
Junior Member
I've found a solution.
Re: MySQL numfiles problem [message #33859 is a reply to message #33853] Mon, 17 November 2008 07:02 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Dear, Ukexi,

could you please share it with people?
Thank You very much!
Re: MySQL numfiles problem [message #49080 is a reply to message #33853] Fri, 15 March 2013 23:04 Go to previous messageGo to next message
BelTem
Messages: 1
Registered: March 2013
Junior Member
Hi there

Could you please share the solution that you came up with? I'm having same issue.

Smile


BelTem
Re: MySQL numfiles problem [message #49132 is a reply to message #49080] Thu, 28 March 2013 19:38 Go to previous message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
The problem was 4 years ago. if you have some problems I would recommend to create new topic with detailed information what exactly prolem you have.
Also write kernel version, HN OS, CT OS, CT config.

please keep in mind that if you use old software and kernel version it would be recommended to update at least HN.
if you use Debian in HN I recommend to use RHEL based latest stable kernel. information how to do this is in the wiki.
Previous Topic: user_beancounters: failcnt increasing before resources reach limit
Next Topic: "Unable to start init, probably incorrect template" in certain circumstances (several moun
Goto Forum:
  


Current Time: Sat Nov 09 04:49:15 GMT 2024

Total time taken to generate the page: 0.03123 seconds