MySQL Geekery du jour. Cannot open file error.

4 06 2007

This one is going out to the world in general, because it took me 2 hours of googling to find it, and I want to lessen some poor other slobs pain…

MySQL , in this case on a Debian Etch (stable) install, has a limit set on the number of files that can be opened in the mysqld server. Apparently when you start getting close to this limit, like doing something that opens a LOT of tables at once, you start bumping into it. This article describes how to fix this.

For me this happened when trying to do a ‘mysqldump’ of the Drupal 5.0 installation we have. Drupal 5 can put all the sites tables into a single database instance. Of course, that means when you do the mysqldump, if you have a large number of sites, you’re dumping a large number of tables.

Like, say, 530.

In the default configuration, this causes mysqldump to barf with an unhelpful message like this:


Actions

Information

3 responses

21 08 2008
DragonLady

You certainly lessened my pain. Thanks! 🙂

20 01 2009
Tom

Would just like to say thank you. This was certainly stumping me up until I found your blog entry. Keep up the great work!

20 01 2009
dbs

@tom and @dragonlady – you’re both welcome, I’m glad it helped.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: