HttpListener::acceptConnection(): Accept failed:Too many open files in system! — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberHosting

HttpListener::acceptConnection(): Accept failed:Too many open files in system!

After a few months of server activity on which I installed Cyberpanel, this morning I found the hard disk saturated. I investigated and found that the /usr/local/lsws/logs path contained hundreds of error.log and access.log files, which filled the disk space.

Before I deleted the logs I downloaded them, and the error.log files always have the same error:

2020-09-15 23:12:44.947967 [ERROR] [*:443] HttpListener::acceptConnection(): Accept failed:Too many open files in system!
2020-09-15 23:12:44.947971 [ERROR] [*:443] HttpListener::acceptConnection(): Accept failed:Too many open files in system!
2020-09-15 23:12:44.947975 [ERROR] [*:443] HttpListener::acceptConnection(): Accept failed:Too many open files in system!
2020-09-15 23:12:44.947979 [ERROR] [*:443] HttpListener::acceptConnection(): Accept failed:Too many open files in system!
2020-09-15 23:12:44.947982 [ERROR] [*:443] HttpListener::acceptConnection(): Accept failed:Too many open files in system!
2020-09-15 23:12:44.947986 [ERROR] [*:443] HttpListener::acceptConnection(): Accept failed:Too many open files in system!
...

What happens and why does it happen?

Comments

  • Hi Fliva!
    I'm sure a more experienced cyp user will be here to assist shortly, but from what i understand it looks like the user which OLS runs as may have exhausted its "open files limit".
    On Centos; OLS runs as root and you can probably check and change these limits by following a simple article like this https://rtcamp.com/tutorials/linux/increase-open-files-limit/

    Your procedure might change depending on your distribution. Feel free to reach out if you have any more questions or need some help getting your server back up.

    We have seen cyp host hundreds of WP websites on a single OLS instance and not run into this particular issue, but I can't say for sure what your limit is or why OLS is trying to potentially open more files than the FS in userland supports by default... As i mentioned at the beginning of the reply, i'm sure that a more experienced cyp admin will be here to help out soon.

    Respectfully,
    @aitp/nadmin
  • Actually, here's a much more relevant article describing a similar symptom and resolution :
    https://linholiver.com/diary/fixed-too-many-open-files-error-on-litespeed-web-server/
  • As it happens to me, I guess it happens to others, with servers under pressure. Why is this tuning not done automatically by Cyberpanel during installation?
  • Type your comment> @fliva said:
    > As it happens to me, I guess it happens to others, with servers under pressure. Why is this tuning not done automatically by Cyberpanel during installation?

    As each user has different requirements? Ive never had to alter this.

    Upon install of Cyberpanel and the related software you have no websites running. How is CP supposed to know what your setting requirements will be?
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
    https://www.cyberhosting.org
    You can now earn with the Cyberhosting affiliate scheme. Join today
    https://www.cyberhosting.org/affiliates/
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!