Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    4

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

    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. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by Noki View Post
    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?
    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. #3
    Registered User
    Join Date
    Jul 2006
    Posts
    4

    Default

    Tried that one... It's not working... still the same error...

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by Noki View Post
    Tried that one... It's not working... still the same error...
    Is there anything in /etc/limits.conf that would limit this user's ability to consume large quantities of RAM?

  5. #5
    Registered User
    Join Date
    Jul 2006
    Posts
    4

    Default

    there is no /etc/limits.conf

  6. #6
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by Noki View Post
    there is no /etc/limits.conf
    Sorry about that - been a while. It's /etc/security/limits.conf

  7. #7
    Registered User
    Join Date
    Jul 2006
    Posts
    4

    Default

    all the lines start with an # - so they are all comments ... are there any default settings I have to override?

  8. #8
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by Noki View Post
    all the lines start with an # - so they are all comments ... are there any default settings I have to override?
    /etc/security/limits.conf is explained beginning on slide 12 of our Security 1 presentation from the 2007 cPanel Conference: http://twiki.cpanel.net/twiki/pub/Al...Security_1.pdf

Similar Threads & Tags
Similar threads

  1. Java app problem (OpenJDK RE 1.6.x)
    By PPNSteve in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-07-2009, 01:26 PM
  2. Replies: 0
    Last Post: 07-27-2009, 06:48 AM
  3. Trying run a java app but have java issue
    By TJCooper in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-11-2004, 12:35 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube