Results 1 to 7 of 7
  1. #1

    File descriptors

    Hi guys,

    Someone add a lot of domain and subdomain names on my server. Then Apache is death. Error_log says:

    [Thu May 12 15:48:49 2005] [error] (24)Too many open files: could not open transfer log file /usr/local/apache/domlogs/livesexlist.association-international-nat

    I remove some of the subdomains and it run again.

    1. What is going on at directory domlogs anyway? I thought stats software, like awstats, etc. put their logs in tmp directory in the website.

    2. How do I increase the number of descriptors so my users can add more domains and subdomains?


  2. #2
    Join Date
    Dec 2002

    Have a look on this

    Hope this helps
    knowledge is Power , Spread it.
    [email protected]
    AIM:AhmedFouad0 , yahooID:xor2004

  3. #3
    This url suggest
    that we should play around with files like file-nr, and stuff. I have no such file though.

    [email protected] [/usr/local/apache/domlogs]# cat /proc/sys/kernel/file-nr
    cat: /proc/sys/kernel/file-nr: No such file or directory
    [email protected] [/usr/local/apache/domlogs]# cat /proc/sys/kernel/file-nr
    cat: /proc/sys/kernel/file-nr: No such file or directory
    [email protected] [/usr/local/apache/domlogs]# cat /proc/sys/kernel/inode-nr
    cat: /proc/sys/kernel/inode-nr: No such file or directory
    [email protected] [/usr/local/apache/domlogs]# cat /proc/sys/kernel/file-max
    cat: /proc/sys/kernel/file-max: No such file or directory
    [email protected] [/usr/local/apache/domlogs]# cat /proc/sys/kernel/inode-max
    cat: /proc/sys/kernel/inode-max: No such file or directory

  4. #4
    Join Date
    Apr 2002
    Cpanel box?

    If so
    cd /scripts/

    and read the error message if apache will not start

  5. #5
    No no. Apache has started. But only after I reduce sufficient numbers of subdomains.

    I want to add those subdomains agai. I can only do so after increasing the limit of file descriptor.

    I can't file inode-max though. Is the file common among linux?

  6. #6
    hope this helps.
    if possible login under the username in question, and type "uname -n"
    default should be 1024
    then as root, edit.
    <username> hard nofile 4096
    <username> soft nofile 2048

    bill hard nofile 8192
    bill soft nofile 4096

    obviously set the numbers to what is best for your situation, some research here would be advised.

    after editing you will have to restart the user 'session', you may even want to reboot the box, just to make sure.

  7. #7
    # /etc/security/limits.conf
    #Each line describes a limit for a user in the form:
    #<domain> <type> <item> <value>
    #<domain> can be:
    # - an user name
    # - a group name, with @group syntax
    # - the wildcard *, for default entry
    # - the wildcard %, can be also used with %group syntax,
    # for maxlogin limit
    #<type> can have the two values:
    # - "soft" for enforcing the soft limits
    # - "hard" for enforcing hard limits
    #<item> can be one of the following:
    # - core - limits the core file size (KB)
    # - data - max data size (KB)
    # - fsize - maximum filesize (KB)
    # - memlock - max locked-in-memory address space (KB)
    # - nofile - max number of open files
    # - rss - max resident set size (KB)
    # - stack - max stack size (KB)
    # - cpu - max CPU time (MIN)
    # - nproc - max number of processes
    # - as - address space limit
    # - maxlogins - max number of logins for this user
    # - priority - the priority to run user process with
    # - locks - max number of file locks the user can hold
    #<domain> <type> <item> <value>

    #* soft core 0
    #* hard rss 10000
    [email protected] hard nproc 20
    [email protected] soft nproc 20
    [email protected] hard nproc 50
    #ftp hard nproc 0
    [email protected] - maxlogins 4

    # End of file

    Okay I see.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts