[solved] Too many open files

Discussion in 'General' started by IanD, Jul 26, 2011.

  1. IanD

    IanD Member

    Hi,

    Around once per hour I am getting the email:

    LiteSpeed Web server server on server restarts automatically to fix 503 Errors

    Fair enough, I check my log files and I can see this is the problem:

    Code:
    2011-07-20 22:51:28.771 [ERROR] HttpListener::acceptConnection(): [***.***.***.***] can't accept:Too many open files!
    This has been happening for a while, I have followed the advice on:

    http://www.litespeedtech.com/how-tos.html#qa_incfd

    Code:
    root@server2 [~]# cat /proc/sys/fs/file-nr
    12750   0       4847816
    And

    Code:
    ulimit -n 10000
    Though this normally gets reset back to 2048 after a while.

    I have been logging the number of open files of root and nobody with:

    #/usr/sbin/lsof -u root | wc -l
    #/usr/sbin/lsof -u nobody | wc -l

    and it appears that when 'nobody' gets to around 20k, that's when the problems start.

    Any any idea what this limit is and how to change it?

    Many thanks,

    Ian
    Last edited by a moderator: Jul 30, 2011
  2. NiteWave

    NiteWave Administrator

    Please confirm the version: it's the latest 4.1.2 ? if not, do a force re-install and see if issue still exists.
  3. IanD

    IanD Member

    It is 4.1.2 - I have forced reinstall and will let you know if it continues.

    Thanks.
  4. mistwang

    mistwang LiteSpeed Staff

    if it happen again, please compress and send output of lsof.
  5. IanD

    IanD Member

    Unfortunately it is still happening.. I have sent the lsof output to:

    info at litespeedtech.com

    Let me know if you need it sending somewhere else.

    Thanks for your help.
  6. IanD

    IanD Member

    After new force install I am no longer getting this problem which is great.

    Still restarting very often due to 503 errors - but I believe this is probably a different problem that I will look into!

    Thanks for sorting this one out.
  7. mistwang

    mistwang LiteSpeed Staff

    Please force reinstall 4.1.2, more bug fixed for this issue.
  8. IanD

    IanD Member

    Yes - force reinstalling again has fixed it.

    Thanks for the awesome level of support here!

Share This Page