Apache error “Too many open files: could not open transfer ……..Unable to open logs”

The server usually throws this error when there is a failure to start apache. The above description can be found in the error logs of the server.

Solutions:

Step 1: Open file /etc/init.d/httpd OR /usr/sbin/apachectl

Step 2: Add `ulimit -n 65536`

{The error usually occurs due to the lower number of file descriptors.}

To check the limit of file descriptors over the server described within the file /proc/sys/fs/file-max, run the following command:

# cat /proc/sys/fs/file-max
1024

If the value found in fs.file-max small, you must increase it by running the following command:

# echo “65535 > /proc/sys/fs/file-max

To save these settings for future reboots to keep the values, you may add it to the file /etc/sysctl.conf.

# Maximum number of open files permitted
fs.file-max = 65535

To load new values from the sysctl.conf file, run:

# sysctl -p /etc/sysctl.conf

Now you must restart httpd service by running the following command:

/etc/init.d/httpd restart

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

What Are The Standard Steps To Update Nameservers

In this post, you will learn the standard instructions for updating Nameservers. Nameservers are the…

Top Six Factors That Will Help in Choosing the Right VPS Hosting

Virtual Private Server Hosting is booming day by day. VPS is a virtualization technology that helps…

17 Essential Things That Your Business Disaster Recovery Plan Should Contain

A business disaster occurs when the essential elements of a business are unable to function…