Hello.
See:
http://dev.mysql.com/doc/mysql/en/table-cache.html
Frank Bax <fbax@stripped> wrote:
> It seems the "bad file number" error was caused by MySQL trying to have
> more than 128 files open at one time. This was "fixed" by changing MySQL
> startup, but the "fix" would not have been needed if MySQL were to close
> open files are some period of "no activity to a table" - does MySQL ever
> close a file? If I create a table and run a select on it, then there is no
> access to that table for months (and MySQL is not shutdown or restarted),
> does MySQL still have the file open?
>
> Yes, I ran myisamchk and there are no problems with database.
>
> Frank
>
>
> At 02:36 PM 4/6/05, V. M. Brasseur wrote:
>
>>According to perror:
>>perror 9
>>Error code 9: Bad file number
>>
>>This is an operating system error code:
>>http://dev.mysql.com/doc/mysql/en/operating-system-error-codes.html
>>
>>Out of curiosity, have you tried running myisamchk or some CHECK TABLE
>>commands yet?
>>http://dev.mysql.com/doc/mysql/en/table-maintenance.html
>>
>>Cheers,
>>
>>--V
>>
>>Frank Bax wrote:
>>>At 10:07 AM 4/5/05, Frank Bax wrote:
>>>
>>>>At 04:27 PM 4/4/05, Frank Bax wrote:
>>>>
>>>>>Cannot execute query.
>>>>>
>>>>><snip my SQL statement>
>>>>>
>>>>>Can't find file: './donor/list_lst.frm' (errno: 9)
>>>>>
>>>>>----- -----
>>>>>
>>>>>I got the same error last week on a different table. Today I notice
>
>>>>>that there is a table in another database on same system producing the
>
>>>>>same error. I attempted to access mysql cli, but it just locked up
>>>>>after entering password. Start/stop mysql and mysql cli at least
>>>>>started but issued errors about some tables even before I entered a
>>>>>command. I decided to reboot and the problem goes away (for a
> while).
>>>>>
>>>>>MySQL 4.0.20 - OpenBSD 3.6
>>>>
>>>>
>>>>
>>>>Forgot to mention a couple of things:
>>>>
>>>>1) The file that mysql complains about does exist.
>>>># ls -ltr donor/list*.frm
>>>>-rw-rw---- 1 _mysql _mysql 8694 Jan 15 09:43 donor/list_lst.frm
>>>>
>>>>2) When problem recurs (as it did on both databases this morning), the
>>>>same file in each database is affected each time error appears.
>>>>
>>>>3) In both databases (on same system) it is frm files in the error
> message.
>>>
>>>Since OpenBSD 2.8, there is a default limit of 128 open files for daemon
>>>processes.
>>>Add --open-files-limit=2048 to mysql startup.
>>> http://dev.mysql.com/doc/mysql/en/openbsd-2-8.html
>>>The suggested changes to /etc/login.conf were not necessary on my system.
>>>Does MySQL ever close the file(s) associated with table(s), or once open
>>>do they stay open until shutdown?
>>>Frank
>>
>>--
>>MySQL General Mailing List
>>For list archives: http://lists.mysql.com/mysql
>>To unsubscribe: http://lists.mysql.com/mysql?unsub=1
>
>
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Gleb Paharenko
/ /|_/ / // /\ \/ /_/ / /__ Gleb.Paharenko@stripped
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET
<___/ www.mysql.com