MySQL errors after update , error 1018 (HY000), errno: 24

Today I’ve updated MySQL server on one of my Ubuntu 12.04 servers. After the upgrade finished, shock and horror: all websites were down, WordPress sites were presenting install page. Quickly connected to mysql via CLI and tried to see if the databases are still there:

mysql> show databases;
ERROR 1018 (HY000): Can't read dir of '.' (errno: 24)

I’ve tried setting limits as in this article, but that didn’t seem to help. Only after adding “open-files-limit = 2048” to my.cnf and restarting the MySQL server things went back to normal. So a big thank you to the author of the article, but I would like to know if there is any need setting those limits or not(obviously I was stressed out over the web sites being down and didn’t test all things).

Anyone else has any experience with this problem?



2 replies
  1. msouth
    msouth says:

    We have to start ours with ulimit -n 63536 set; if we don’t, it gives us this error. The default ulimit for the user that runs our mysql is 1024. So we have in our /etc/rc.local something like:

    ulimit -n 63536 ; su -c ‘[command to start mysql]’ [user_that_runs_mysql]

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply