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.

Problems running a Java-APP as User, Could not reserve enough space for object heap

Discussion in 'General Discussion' started by Noki, Apr 27, 2009.

  1. Noki

    Noki Registered

    Joined:
    Jul 23, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi!

    I have problems running a Java-APP as user from the Shell. It seems that cPanel limits the memory a user could allocate.

    If I login as user and type

    /usr/bin/java -version

    I get:

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

    If I run it as root everything is fine.

    My setup:

    cPanel 11.24.4-R35075 - WHM 11.24.2 - X 3.9
    CENTOS 5.3 x86_64 standard

    I installed openjdk using the RPM-Installer.

    How do I increase the memory-limit to a value of ~3GB or how do I turn it of completely?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I know this would be the case if you have Shell Fork Bomb Protection enabled. If you disable it, that will let all users use more memory, but it makes your server vulnerable to fork bombs.
     
  3. Noki

    Noki Registered

    Joined:
    Jul 23, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Tried that one... It's not working... still the same error...
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Is there anything in /etc/limits.conf that would limit this user's ability to consume large quantities of RAM?
     
  5. Noki

    Noki Registered

    Joined:
    Jul 23, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    there is no /etc/limits.conf
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Sorry about that - been a while. It's /etc/security/limits.conf
     
  7. Noki

    Noki Registered

    Joined:
    Jul 23, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    all the lines start with an # - so they are all comments ... are there any default settings I have to override?
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page