Apache: unable to open logs

In the annals of “Everyday is a learning day”. I have an Apache server hosting student websites, and the number of websites grew to over 700 within a day and Apache was complaining with error:

It took a little while to narrow down the problem as I assumed there was a path that did not exist or a type but eventually noticed that it was only when the number of virtual hosts increased over 504 (each with an error log and access log so approx 1008). This is very close to 1024 and triggered the thought that the problem was related to the number of open files and ulimit.

I could check the maximum number of open files with:

And I increased the number of open files temporarily with:

When that had solved the problem I permanently changed the setting by creating a file:

With contents:


Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">