geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve H." <st...@sjlt.co.uk>
Subject Re: [geronimo] Re: Out of memory during second publish - reproduced
Date Sat, 27 Dec 2008 01:07:28 GMT

I'm getting this error consistently after increasing the memory allocation
for Eclipse and Geronimo.

I'm running on OpenSUSE 10.3 x64 with Geronimo 2.1.3 on a machine with 2GB
RAM.

Output from 'ps aux | grep java' and Eclipse error trace shown below: -

Output of 'ps aux | grep java' following PermGen crash in Geronimo.

steve     4325 17.9 18.6 1474804 383908 ?      Sl   23:43   1:38
/usr/lib64/jvm/java-1.6.0.u7-sun-1.6.0.u7/jre/bin/java -Xmx512m
-XX:MaxPermSize=512m -jar
/usr/share/eclipse/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
-os linux -ws gtk -arch x86_64 -showsplash -launcher
/usr/share/eclipse/eclipse -name Eclipse --launcher.library
/usr/share/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.101.R34x_v20080731/eclipse_1115.so
-startup
/usr/share/eclipse/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
-exitdata 160002 -vm /usr/bin/java -vmargs -Xmx512m -XX:MaxPermSize=512m
-jar
/usr/share/eclipse/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
steve     4835 27.1 14.8 518960 305744 ?       Sl   23:44   2:13
/usr/lib64/jvm/java-1.6.0.u7-sun-1.6.0.u7/bin/java
-javaagent:/usr/local/geronimo-tomcat6-javaee5-2.1.3/bin/jpa.jar
-Djava.ext.dirs=/usr/local/geronimo-tomcat6-javaee5-2.1.3/lib/ext:/usr/lib64/jvm/java-1.6.0.u7-sun-1.6.0.u7/jre/lib/ext
-Djava.endorsed.dirs=/usr/local/geronimo-tomcat6-javaee5-2.1.3/lib/endorsed:/usr/lib64/jvm/java-1.6.0.u7-sun-1.6.0.u7/jre/lib/endorsed
-Xmx512m -XX:MaxPermSize=512m -Dfile.encoding=UTF-8 -classpath
/usr/local/geronimo-tomcat6-javaee5-2.1.3/bin/server.jar
org.apache.geronimo.cli.daemon.DaemonCLI --long
steve    10155  0.0  0.0   5120   788 pts/1    R+   23:52   0:00 grep java

Trace from Eclipse

23:51:10,653 WARN  [Settings] Settings: Could not parse struts.locale
setting, substituting default VM locale
23:51:31,757 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.OutOfMemoryError: PermGen space
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
etc...

Output show below: -

Tim McConnell wrote:
> 
> 
> That's wonderful Dale !! Please let me know if you have any other
> problems. BTW, 
> I've open the following JIRA to fix similar problems.....
> 
> -----> https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-543
> 
> DRS2 Usenet wrote:
>> Tim McConnell wrote:
>> 
>> (snip)
>>> 4.  Page down in that section and append your VM arguments at the end 
>>> -- don't delete those that are already there. I used the same ones 
>>> that Kevan used, but I'm using Java 1.5 and I see that you're using 
>>> Java 1.6:
>>>
>>>     -Xmx512m -XX:MaxPermSize=256m
>> (snip)
>>> Please try this and let me know what happens. I think you'll have 
>>> better results now. Meanwhile, I'm going to open a GEP JIRA to 
>>> investigate if we can programmatically determine and set the Geronimo 
>>> server VM arguments using those already established for Eclipse since 
>>> obviously the default values for the server are not always sufficient. 
>>> Thanks much.
>> Thanks Tim, That worked great.  I'd been using "run configurations" to 
>> make the Geronimo JVM settings... never tried double clicking on the 
>> server.  I've been able to republish many times without error AND 
>> without restarting the server (this is really a NICE feature!).
>>>
>>>
>>> Tim McConnell wrote:
>>>> Hi Dale, just a quick note to tell you that I can now reproduce your 
>>>> failure. Looking for a resolution, and will let you know what I find 
>>>> out.....
>>>>
>>>> DRS2 Usenet wrote:
>>>>> I had already installed jdk1.6.0_06
>>>>> I had already installed Geronimo: 
>>>>> geronimo-tomcat6-javaee5-2.1.3-bin.zip
>>>>> I installed a fresh Ganymede: eclipse-jee-ganymede-SR1-win32.zip
>>>>> Added Geronimo 2.1 plugins from within Eclipse.
>>>>> Then I deployed a web application.  The first time, it deploys 
>>>>> fine.  The second time, I get an out of memory, due to heap space.
>>>>>
> 
>>>>> The web application may be found here: 
>>>>> http://www.manning.com/dbrown/SampleApplication.zip
>>>>>
>>>>> 1) Download the source code from above, and unzip.
>>>>> 2) copy Struts2InAction.war to Struts2InAction.zip
>>>>> 3) Unzip the Struts2InAction.zip file to a folder called WebContent 
>>>>> and delete Struts2InAction.zip
>>>>> 4) Validate that your WebContent has WEB-INF, index.html, etc.
>>>>> 5) In your Eclipse workspace folder, create a folder called 
>>>>> Struts2InAction, and move your WebContent folder into it.
>>>>> 6) Start Eclipse
>>>>> 7) Right-click in Project Explorer, New > Project > Web > Dynamic

>>>>> Web Project (next)
>>>>> 8) Project name: Struts2InAction > select Geronimo 2.1 > (next)
>>>>> 9) Leave Context Root and Content Directory, but change Java Source 
>>>>> Directory to WebContent/WEB-INF/src > (finish)
>>>>> 10) Right-click your project > Run As > Run On Server
>>>>> 11) Point browser at http://localhost:8080/Struts2InAction 
>>>>> <http://localhost:8080/HelloWorld>
>>>>> 12) index.html will say "one moment please" while the jsp compiles, 
>>>>> then the menu will come-up.
>>>>> 13) Back in Eclipse, edit (for example) 
>>>>> WEB-INF/applicationContext.xml with your MySql login and save the
>>>>> file.
>>>>> 14) Wait for the application to republish itself.
>>>>>
>>>>> This is where the error occurs:
>>>>>
>>>>> Deployment failed due to java.lang.OutOfMemoryError: Java heap space
>>>>>
>>>>> I've started Eclipse with -vmargs -Xmx768M and get the same result. 
>>>>> Not able to put 1024M in there, for some reason (Eclipse won't even 
>>>>> start).
>>>>>
>>>>> --Dale--
>>>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Out-of-memory-during-second-publish---reproduced-tp20805951s134p21180759.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message