Questions about /etc/profile ulimit -Hn and /etc/initscript & /etc/security/limits

From: tripolar (tripolar_at_comcast.net)
Date: 06/04/04

  • Next message: Alex Derkach: "Re: what happened to KDE?"
    Date: Thu, 03 Jun 2004 22:50:14 +0000
    To: debian-user@lists.debian.org
    
    

    When running java w/ another program I get this error message-
    java.io.IOException: Too many open files
    I was told
    1) change /etc/profile to add ulimit -Hn 65536
    2)create /etc/initscript as described in man initscript, including
    ulimit -Hn 65536
    Someone else mentioned /etc/security/limits.
    Now I have looked at /etc/profile which is gibberish for someone like me
    who knows nothing about shell scripts. I wonder do I just add the line
    "ulimit -Hn 65536" anywhere in that file??
    Next question- I have read man initscript and wonder do I take that
    sample file- change the ulimit -Hn to 65536 and save.
    This particular line- "Experimenting with this can make your system
    un(re)bootable." has be quite worried. In /etc/security/limits
    everything is commented out without any reference to ulimits. Yes I have
    googled without luck- specifically Debian way of doing this. Here is
    /etc/profile-
    "# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
    # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
    PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"

    if [ "$PS1" ]; then
      if [ "$BASH" ]; then
        PS1='\u@\h:\w\$ '
      else
        if [ "`id -u`" -eq 0 ]; then
          PS1='# '
        else
          PS1='$ '
        fi
      fi
    fi
    ulimit -Hn 65536
    export PATH
    #export CLASSPATH=.:/usr/local/j2re1.4.2_04/lib:/usr/local/j2re1.4.2_04/lib
    #export JAVA_HOME=/usr/local/j2re1.4.2_04
    #export PATH=$PATH:/usr/local/j2re1.4.2_04/bin
    umask 022"
    You can see I added "ulimit -Hn 65536". I havent rebooted yet out of
    fear *grimace*
    Considering the path to java is below
    /usr/lib/j2re1.4-sun/bin/java
    and the path to the other program is /home/user/program/program.sh
    Do I need to be specific about java or user in /etc/profile?
    Lastly do I need to set something in /etc/security/limits?
    Thanks

    After banging my head on this problem I have a headache and need
    aspirin. I hope someone will help me out with this ulimit problem.

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Alex Derkach: "Re: what happened to KDE?"

    Relevant Pages

    • Re: AIX java update for DST
      ... The Java installation Directory /usr/java14/jre is ... You may use "ulimit -d unlimited" to set data limit ... Get your game face on with the latest PS3 news and previews at Yahoo! ...
      (AIX-L)
    • Re: "Error occurred during initialization of VM" Error Message
      ... Could not reserve enough space for object heap" ... but Java ... memory Java can claim on various OS? ... These are defined by ulimit. ...
      (comp.lang.java.programmer)
    • Re: Stack overflows running JDK 1.3.1 on Fedora Core 2
      ... There was a problem with 1.3 and the request stack size not being honoured, leading to a seg fault (IIRC, rather than StackOverflowError). ... However, you may need to use that in conjunction with ulimit on versions of Java before 1.6, because -J-Xss does not apply to the thread the process is started with. ...
      (comp.lang.java.help)
    • Re: -mx1024m OK, but -mx2048m not OK
      ... do all distros have Java ... On linux you need to issue the ulimit ... My preference for linux is Suse professional. ...
      (comp.lang.java.programmer)
    • Re: AIX java update for DST
      ... I used the different "bit" java update and all went well. ... You may use "ulimit -d unlimited" to set data limit ... Get your game face on with the latest PS3 news and previews at Yahoo! ...
      (AIX-L)