How to fix the Apache Error: Too many open files

By AminTaheri

Rate: (0 Ratings)

If you run into a problem with the dreaded “Too many open files” error message in Apache which caused it to crash and left it in a non-startable state. Most of the times this is becuase of a lack of available file descriptors on your system - most systems are shipped with a default of 1024 - in a shared hosting environment with several hundreds of domains, this can easily be passed. You can try this step in order to avoid having to recompile your system to allow for a higher FD (File Descriptor) amount

Instructions

Difficulty: Easy
Step1
Edit the limits.conf file
nano -w /etc/security/limits.conf
Step2
Change (or add) the last two lines
* soft nofile 32768
* hard nofile 32768
Step3
Restart APACHE
/sbin/service httpd restart

Tips & Warnings

  • While this will not solve your problems long term, it will help you for now. Eventually if you keep adding new domains or files into apache you may need to recompile your sources to have a higher file descriptor limit.

Post a Comment

POST A COMMENT

Request a New How-To Article

Looking for more How To information? Chances are there’s an eHow member who knows how to do what you’re looking to do. Submit an article request now!

eHow Article: How to fix the Apache Error: Too many open files

Article By: AminTaheri

AminTaheri

Authority Authority | 5028 Points

Category: Computers

Articles: See my other articles

Related Ads