<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[MYD not found (Errcode: 24)when using LOCK TABLES ]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Fri, 09 Apr 2010 11:23:08 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	Bug #3893 mysqldump: Got error: 1105: not found (Errcode: 24) when using LOCK TABLES <br/><br/>26 May 2004 5:42] Mudit Wahal <br/>Description:<br/>mysql&nbsp;&nbsp;Ver 14.3 Distrib 4.1.1-alpha, for pc-linux (i686)<br/><br/>mysqldump is giving error on few tables. I even dropped the tables<br/>and recreated them with same data. Still same error messsage.<br/><br/>mysqldump: Got error: 1105: File './intraday/ASKJ_R.MYD' not found (Errcode: 24)when<br/>using LOCK TABLES<br/><br/>-rw-rw----&nbsp;&nbsp;&nbsp;&nbsp;1 mysql&nbsp;&nbsp;&nbsp;&nbsp;mysql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8656 May 25 17:59 ASKJ_R.frm<br/>-rw-rw----&nbsp;&nbsp;&nbsp;&nbsp;1 mysql&nbsp;&nbsp;&nbsp;&nbsp;mysql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;404524 May 25 17:59 ASKJ_R.MYD<br/>-rw-rw----&nbsp;&nbsp;&nbsp;&nbsp;1 mysql&nbsp;&nbsp;&nbsp;&nbsp;mysql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;182272 May 25 17:59 ASKJ_R.MYI<br/><br/>mysqldump: Got error: 1105: File './eod_indices/GSPCARD_X.MYD' not found (Errcode: 24)<br/>when using LOCK TABLES<br/>-rw-rw----&nbsp;&nbsp;&nbsp;&nbsp;1 mysql&nbsp;&nbsp;&nbsp;&nbsp;mysql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8714 May 25 18:09 GSPCARD_X.frm<br/>-rw-rw----&nbsp;&nbsp;&nbsp;&nbsp;1 mysql&nbsp;&nbsp;&nbsp;&nbsp;mysql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 34664 May 25 18:09 GSPCARD_X.MYD<br/>-rw-rw----&nbsp;&nbsp;&nbsp;&nbsp;1 mysql&nbsp;&nbsp;&nbsp;&nbsp;mysql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7168 May 25 18:10 GSPCARD_X.MYI<br/><br/>Thanks<br/><br/>How to repeat:<br/>Dont know .. can you give the data[26 May 2004 21:55] Mudit Wahal <br/>mysql> use eod_indices;<br/>Database changed<br/>mysql> desc GSPCARD_X;<br/>+--------+---------------+------+-----+------------+-------+<br/>&#124; Field&nbsp;&nbsp;&#124; Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124; Null &#124; Key &#124; Default&nbsp;&nbsp;&nbsp;&nbsp;&#124; Extra &#124;<br/>+--------+---------------+------+-----+------------+-------+<br/>&#124; date&nbsp;&nbsp; &#124; date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124; PRI &#124; 0000-00-00 &#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;<br/>&#124; close&nbsp;&nbsp;&#124; decimal(10,2) &#124; YES&nbsp;&nbsp;&#124;&nbsp;&nbsp;&nbsp;&nbsp; &#124; NULL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;<br/>&#124; high&nbsp;&nbsp; &#124; decimal(10,2) &#124; YES&nbsp;&nbsp;&#124;&nbsp;&nbsp;&nbsp;&nbsp; &#124; NULL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;<br/>&#124; low&nbsp;&nbsp;&nbsp;&nbsp;&#124; decimal(10,2) &#124; YES&nbsp;&nbsp;&#124;&nbsp;&nbsp;&nbsp;&nbsp; &#124; NULL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;<br/>&#124; volume &#124; int(11)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124; YES&nbsp;&nbsp;&#124;&nbsp;&nbsp;&nbsp;&nbsp; &#124; NULL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;<br/>&#124; yest&nbsp;&nbsp; &#124; decimal(10,2) &#124; YES&nbsp;&nbsp;&#124;&nbsp;&nbsp;&nbsp;&nbsp; &#124; NULL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;<br/>+--------+---------------+------+-----+------------+-------+<br/>6 rows in set (0.52 sec)<br/><br/>mysql> use intraday;<br/>Database changed<br/>mysql> desc ASKJ_R;<br/>+--------+---------------+------+-----+------------+-------+<br/>&#124; Field&nbsp;&nbsp;&#124; Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124; Null &#124; Key &#124; Default&nbsp;&nbsp;&nbsp;&nbsp;&#124; Extra &#124;<br/>+--------+---------------+------+-----+------------+-------+<br/>&#124; date&nbsp;&nbsp; &#124; date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124; MUL &#124; 0000-00-00 &#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;<br/>&#124; time&nbsp;&nbsp; &#124; time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124;&nbsp;&nbsp;&nbsp;&nbsp; &#124; 00:00:00&nbsp;&nbsp; &#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;<br/>&#124; value&nbsp;&nbsp;&#124; decimal(10,2) &#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124;&nbsp;&nbsp;&nbsp;&nbsp; &#124; 0.00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;<br/>&#124; volume &#124; int(11)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124;&nbsp;&nbsp;&nbsp;&nbsp; &#124; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;<br/>+--------+---------------+------+-----+------------+-------+<br/>4 rows in set (0.06 sec)[29 May 2004 19:03] Sinisa Milivojevic <br/>Hi!<br/><br/>Thank you for writting to us.<br/><br/>The error that you are getting indicates that you have ran out of file descriptors. <br/><br/>Please, try to increase those for a MySQL server , for example in a manner described in<br/>our manual.<br/><br/>If the error repeats even after that, please let us know.[29 May 2004 19:13] Mudit Wahal <br/>I've table_cache = 24, max_connections = 100 and open_files_limit = 1024.<br/>I'll increase the open_files_limit to 8192 and see if it happens again.<br/><br/>Thanks<br/><br/>Mudit[29 May 2004 19:28] Mudit Wahal <br/>I changed the open_files_limit to 8192 and it happened again<br/>but for a different table.<br/><br/>mysqldump: Got error: 1105: File './intraday/JOE_R.MYD' not found (Errcode: 24) <br/>when using LOCK TABLES<br/><br/>-----------<br/><br/>Here is how I'm dumping the database.<br/><br/>mysqldump&nbsp;&nbsp;--add-drop-table=false --force --quote-names --all --extended-insert --quick<br/>--add-locks --where "date =&nbsp;&nbsp;'2004-05-29'" --database mydatabase_name<br/><br/>------------<br/><br/>If I remove --add-locks, I still get the SAME error message. I guess "--all" option is<br/>automatically adding the lock table.<br/><br/>>mysqldump --version<br/>>mysqldump&nbsp;&nbsp;Ver 10.2 Distrib 4.1.1-alpha, for pc-linux (i686)<br/><br/>Thanks<br/>Mudit[29 May 2004 19:41] Sinisa Milivojevic <br/>You have to change it in mysqld_safe script, unless you are running mysqld under uid of<br/>root. Also, script has to be started by root user.[29 May 2004 19:42] Mudit Wahal <br/>Removed -all from mysqldump, removed --quick, still same issue. There are 8091 tables<br/>in that particular database. When the open_files_limit was 1024, it<br/>used to fail around 507th table. Now when the open_files_limit is<br/>8192, its failing at 4091th table.<br/><br/>BTW, this is only happening since I upgraded from 4.0.1 to 4.1.1-alpha.<br/>I never had this issue in 4.0.1 for 3 years ![29 May 2004 19:44] Mudit Wahal <br/>I've changed in /etc/my.cnf file. I run the mysql.server script from<br/>/etc/rc.d/rc.local script. Will change the mysqld_safe and let you know.<br/><br/>Thanks[29 May 2004 19:46] Sinisa Milivojevic <br/>With this number of tables, 8192 is too low.<br/><br/>You will probably even have to make system wide changes, as per our manual.[29 May 2004 19:51] Mudit Wahal <br/>Why mysqld has to keep the table open after it has been dumped ? I<br/>think its really bad design. If I've 100,000 tables, do you expect<br/>me have 100,000 tables open ???? It should be able to do simple<br/>file management.<br/><br/>Is the issue with only mysqldump or is it general issue with mysqld ?<br/>May be I've to write my own dump program to work around this issue.<br/>I'd expect mysql team to come up with a better solution in future<br/>instead of blaming it on the kernel. 8192 open files are really<br/>more than enough. For dumping tables, it should be one file at a<br/>time anyway.<br/><br/>Are you sure there is no option to flush the tables and close them<br/>after each query ?<br/><br/>Thanks<br/><br/>Mudit[29 May 2004 19:55] Sinisa Milivojevic <br/>Yes, there is a way of circumventing this, but this forum is not here for <br/>free support.<br/><br/>This forum is for fully repeatable test cases, and I have manged recently to dump entiere<br/>database with more then 9000 tables on Red Hat system.[29 May 2004 19:56] Mudit Wahal <br/>How come this was not an issue in 4.0.1 ?[29 May 2004 19:59] Sergei Golubchik <br/>Sorry, but the bug system is not the appropriate forum for asking<br/>support questions. Your problem is not the result of a bug.<br/>For a list of more appropriate places to ask for help using MySQL<br/>products, please visit http://www.mysql.com/support/<br/><br/>Thank you for your interest in MySQL.<br/><br/>Additional info:<br/><br/>As Sinisa pointed out error 24 means that you're out of file descriptors:<br/><br/>% perror 24<br/>Error code&nbsp;&nbsp;24:&nbsp;&nbsp;Too many open files<br/><br/>MySQL doesn't need to keep tables open for dumping, but it does, if they are locked with<br/>LOCK TABLES.<br/><br/>in 4.1 --opt option of mysqldump was made default, and it causes LOCK TABLES. Use<br/>--skip-lock-tables to disable.[29 May 2004 20:12] Mudit Wahal <br/>Hmm... if it was working in 4.0.1 and not working in 4.1.1 , how its NOT a bug ? Suddenly<br/>its a feature/support request ???<br/><br/>I'm really baffled and disappointed at the sametime. And its 100% reproducible.<br/><br/>Just create a database with 10,000 tables, leave open_files_limit=1024.<br/>Try to dump with 4.0.1 (I'm sure you guys still have it sitting around somewhere).<br/>Then dump the same database with the 4.1.1 server.<br/><br/>If it works in 4.0.1 and doesn't work in 4.1.1 , its a BUG. PERIOD.<br/>Mysql doesn't want to fix it, fine ![29 May 2004 20:30] Mudit Wahal <br/>My previous comment applied to "[29 May 8:55am] Sinisa Milivojevic ".<br/>That was not a support question but a genuine bug. If some thing<br/>works in version 4.0.1 and doesn't work in 4.1.1, thats A BUG !<br/>If you change the default behavior of commands across versions, its<br/>an issue with mysql and not with customer.<br/><br/>After following suggestion made by "[29 May 8:59am] Sergei Golubchik ",<br/>I'm not getting any more messages. Thanks Sergei.[5 Aug 2005 12:28] karel barel <br/>I agree with Mudit Wahal in one thing. If I do backup, eg via mysqlhotcopy, all tables are<br/>open after it dumped. Its bad, you must set open_files_limit to custum value, but this<br/>case not occur in standing running. Same problem may be with mass myisamchk. Why DB mng<br/>don't close this tables, pos. if reach any limit?[4 Mar 2008 19:57] Gladstone Taylor <br/>you my all find this usefull if the problem still persists.. or if you are still using an<br/>older build of mysql<br/><br/>http://dev.mysql.com/doc/refman/5.0/en/not-enough-file-handles.html
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] MYD not found (Errcode: 24)when using LOCK TABLES ]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>