ERROR 1018 (HY000): Can ' t read dir of '. ' (errno:24) and other jazz funk classics

Source: Internet
Author: User

Errno:24 means ' Too many open files '. Everything in Linux is a file (or rather a file descriptor).
Every MySQL connection, Every Apache connection etc.

By default Ubuntu allows users to open 1024 files. The hard limit is 8192. So if you start to hear the melodies of errno it probably time to start increasing this limit

To I many files a user has open try this
sudo lsof-u MySQL

Edit the file in/etc/security/limits.conf and add two MySQL lines in the bottom

# @student-maxlogins 4
MySQL Soft nofile 4096
MySQL Hard nofile 8192
# End of File

There is some debate as to whether you need to reboot for this to take effect (I say debate, I rebooted, and didnt google For it as I am in a rush YMMV).

Once this are set you need to make some changes in the MySQL file as. Assuming yours lives in/etc/mysql/my.cnf-edit or add these values

Open-files-limit = 2048
Table_cache = 512

The Table_cache should be researched (start here:http://dev.mysql.com/doc/refman/5.0/en/table-cache.html) and changes Monitored. The default value is should a safe bet to begin with.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.