facebook

Glassish and OutOfMemoryError: PermGen space errors

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #304445 Reply

    Randal Cobb
    Member

    I’m being plagued with OutOfMemoryErrors when working on a relatively simple JEE application in conjunction with Glassish 2.1.1. I’ve tried ME 7.1, 7.5, and now 8.0 and can’t seem to get this resolved. I see very similar results in Linux and in Windows on two different development machines, so I’m not sure if it’s ME related, Glassfish related, or project related. I’m not doing anything odd or non-standard; just a simple ICEFaces web app with two session beans, and two entities.

    The project is a web application using EJB3, Maven (ME version, not stand-alone), and ICEFaces 1.8.1 – Database back-end is PostgreSQL 8.4

    I really don’t have any deployment issues with OOM errors, but rather while running the app once deployed. I consistently get the OOM errors when the EJBs are performing their tasks, and almost 100% of the time during the first invocation of generated entity facades. I do, however, see OOM errors if I have the application ear deployed to the server and try to log into the admin console; I have to undeploy the ear file just to use the server’s admin console.

    I’ve tried increasing the ME MaxPermSize settings from default up to and including 1024M with no change (MyEclipse.ini pasted below). I’ve tried setting the Glassfish server’s JVM parameters in the Glassfish admin console) up to the same settings (1024M), again, with the same results. I’ve even tried adding the -XX:MaxPermSize arguments in the launch configuration for the server itself (the ME configuration in the properties dialog), yet again, the same results.

    Any suggestions where I need to look? Again, It doesn’t seem to matter if I develop on Windows or Linux, I get the errors in similar places on either platform.

    Here is my myeclipse.ini pasted (with PermGen set at 1024M – I know, absurd amount, but I was grasping at straws at this point):

    -startup
    ../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
    --launcher.library
    ../Common/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519
    -install
    /home/randy/java/Genuitec/MyEclipse 8.x Latest
    -vm
    /home/randy/java/Genuitec/Common/binary/com.sun.java.jdk.linux.x86_64_1.6.0.013/bin/java
    -configuration
    /home/randy/java/Genuitec/MyEclipse 8.x Latest/configuration
    -vmargs
    -Xmx512m
    -XX:MaxPermSize=1024m
    -XX:ReservedCodeCacheSize=64m

    Thanks in advance!
    Randy

    #304468 Reply

    Brian Fernandes
    Moderator

    Randy,

    1) The problem would most likely be a memory issue with your glassfish app server, not with MyEclipse – GF would start as a separate process with it’s own memory settings. To set these values, please look at the Launch Configuration section in our appserver tutorial (section 9): http://www.myeclipseide.com/documentation/quickstarts/appservers/

    Once you create a new launch configuration, in the Arguments tab you can specify memory settings that will be used to launch GF, specifying a larger heap / stack size here could fix your issues.

    2) In myeclipse.ini, please take the maxPermSize back to 256m; in some cases, if the value is too large, it will be ignored entirely and defaults will be used. A setting of 256m should be fine for MyEclipse, GF will use different settings as described above.

    Hope this help, please let us know if you require further assistance.

    #304651 Reply

    Randal Cobb
    Member

    This message has not been recovered.

    #304680 Reply

    support-joy
    Member

    This message has not been recovered.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Glassish and OutOfMemoryError: PermGen space errors

You must be logged in to post in the forum log in