The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to ulimit virtual memory - RHE CPanel

Discussion in 'General Discussion' started by LBJ, Apr 20, 2006.

  1. LBJ

    LBJ Well-Known Member

    Nov 1, 2003
    Likes Received:
    Trophy Points:
    G'day All,

    I've installed Jave runtime for a client, and everything tests out perfectly while running as root. However, when running as any non root user java chokes with...

    Error occurred during initialization of VM
    Could not reserve enough space for object heap

    That happens even if I use...

    java -Xms32m -Xmx96m

    Unless the virtual memory for the user running java is set to above 210000, java fails no matter how the -Xm parameters are set.

    I intitially thought I could just modify /etc/profile to ulimit up the virtual memory for the specific user, but that just results in...

    ulimit: virtual memory: cannot modify limit: Operation not permitted

    I then thought I could up the hard limit within /etc/security/limits.conf, but that doesn't appear to support a control for virtual memory.

    I've temporarily disabled Shell Fork Bomb Protection to simplify things, but still can't find where to modify the virtual memory for a non root user.

    Does anyone know of a proven method of increasing virtual memory for one user on a RHE box with CPanel Stable 10.8.1?

    Best Regards,

  2. PeterTable

    PeterTable Member

    Feb 27, 2004
    Likes Received:
    Trophy Points:
    alias java='java -Xms32m -Xmx48m '
    works for me.

Share This Page