← Back to team overview

maria-developers team mailing list archive

Re: Repeated Error in accept: Bad file descriptor

 

Time Less <timelessness@xxxxxxxxx> writes:

>> The problem is that MySQL/MariaDB is using select() to accept new
>> connections. But select() has a hard-coded limit of 1024 on the max number
>> of
>> open files it can support. It seems PBXT uses an open file descriptor per
>> table,
>
>
> Not two per table? It has it looks like many log files, then also a data and
> index file per table. On my system where I'm trying to use 1,000 tables, I
> expect about 2,000+[mumble] file handles.

Sure could be, I don't know the details, just that it seems to open >1000
files simultaneously.

> You can't get out of the state again. The server won't accept connections,
> so you can't drop any tables. You just have to wipe the DB and start over.
> If PBXT is resilient to its tables disappearing between server restarts, you
> could rm files from the data directory.

One way is to use the --bootstrap parameter to mysqld (after stopping the
server).

This allows to start the server, run a set of commands, and shut down, without
needing to connect. Something like

    (echo "DROP TABLE t1;" ; echo "DROP TABLE t2;"; ...) | mysqld --defaults-file=/etc/my.cnf --bootstrap

(I actually tried this).

One way or the other, it's a nasty bug.

 - Kristian.



References