-
15. Re: OutOfMemoryError in JBoss 5.01
yongz Sep 21, 2009 9:57 AM (in response to yongz)Hi jaikiran,
I added -client to the JAVA_OPTS as suggested, still no luck and got the same OOM error. -
16. Re: OutOfMemoryError in JBoss 5.01
yongz Sep 22, 2009 2:32 AM (in response to yongz)Hi Ales/Jaikiran,
Thanks a lot for your support. And now we have some good news for you:
One of my college who also watched this discussion thread has identified that the issue is with VFS ZIP ( the default with Jboss5 ).
By setting -Djboss.vfs.forceVfsJar=true, it forces the use of VFS JAR instead of VFS ZIP. The console output should then say:09:49:15,592 INFO [FileSystemContext] VFS forced fallback to vfsjar is enabled.
Our application starts successfully with this setting and is able to creates 701 threads on 1.3G heap size. -
17. Re: OutOfMemoryError in JBoss 5.01
jaikiran Sep 22, 2009 2:51 AM (in response to yongz)Good to know that you have got it working and thanks for letting us know about the change that you did.
By setting -Djboss.vfs.forceVfsJar=true, it forces the use of VFS JAR instead of VFS ZIP.
That's interesting. I am not actually aware about the differences in VFS jar and VFS zip and when that flag is expected to be used. Ales, would know better. -
18. Re: OutOfMemoryError in JBoss 5.01
alesj Sep 22, 2009 3:28 AM (in response to yongz)vfsjar is the old impl we used to use to handle jars.
We had some issues with file locking on Winz, serialization in WS, temp files, ...
While looking at the issues, we got an external contribution which fixed those issues - vfszip.
While struggling to pass the TCK and ship AS5, we haven't yet fully check how to optimize some of the things in this new impl.
I guess it's high time we do this. :-) -
19. Re: OutOfMemoryError in JBoss 5.01
jaikiran Sep 22, 2009 3:34 AM (in response to yongz)"alesj" wrote:
we haven't yet fully check how to optimize some of the things in this new impl.
I guess it's high time we do this. :-)
yongz, is it possible for you to share that application (or any similar application which reproduces this issue)? If yes, please create a JIRA here https://jira.jboss.org/jira/browse/JBAS and attach the application so that the issue can be fixed. -
20. Re: OutOfMemoryError in JBoss 5.01
yongz Sep 22, 2009 8:00 PM (in response to yongz)Hi jaikiran,
This issue can be easily reproduced without our application:
Use:
1. JVM:-Xms1300m -Xmx1300m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
2. JBoss5.0.1.GA + JBossws-Metro 3.1.0 GA + JBoss messaging 1.4.2GA SP1
Here is the exception:08:10:18,984 ERROR [AbstractKernelController] Error installing to Real: name=vfs file:/D:/myapp/jboss-5.0.1.GA-admin/server/myapp/deployers/jbossws.d eployer/ state=PreReal mode=Manual requiredState=Real org.jboss.deployers.spi.DeploymentException: Error deploying jaxws-rt.jar: null at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:201) at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:103) at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internal Deploy(AbstractVFSRealDeployer.java:45) at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy( AbstractRealDeployer.java:50) at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(Deployer Wrapper.java:171) at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(Deployer sImpl.java:1439) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFi rst(DeployersImpl.java:1157) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFi rst(DeployersImpl.java:1210) at org.jboss.deployers.plugins.deployers.DeployersImpl.install(Deployers Impl.java:1098) at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra ctControllerContext.java:348) at org.jboss.dependency.plugins.AbstractController.install(AbstractContr oller.java:1598) at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra ctController.java:934) at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr actController.java:1062) at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr actController.java:984) at org.jboss.dependency.plugins.AbstractController.change(AbstractContro ller.java:822) at org.jboss.dependency.plugins.AbstractController.change(AbstractContro ller.java:553) at org.jboss.deployers.plugins.deployers.DeployersImpl.process(Deployers Impl.java:781) at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeploye rImpl.java:698) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadPr ofile(ProfileServiceBootstrap.java:297) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start( ProfileServiceBootstrap.java:205) at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java: 405) at org.jboss.Main.boot(Main.java:209) at org.jboss.Main$1.run(Main.java:547) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.OutOfMemoryError at java.util.zip.Inflater.init(Native Method) at java.util.zip.Inflater.<init>(Inflater.java:75) at java.util.zip.ZipFile.getInflater(ZipFile.java:375) at java.util.zip.ZipFile.getInputStream(ZipFile.java:320) at java.util.zip.ZipFile.getInputStream(ZipFile.java:286) at org.jboss.virtual.plugins.context.zip.ZipFileWrapper.openStream(ZipFi leWrapper.java:214) at org.jboss.virtual.plugins.context.zip.ZipEntryContext.openStream(ZipE ntryContext.java:1066) at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.openStream(ZipE ntryHandler.java:153) at org.jboss.virtual.VirtualFile.openStream(VirtualFile.java:230) at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:609) at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:573) at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:488) at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:187) ... 23 more Exception in thread "CompilerThread1" java.lang.OutOfMemoryError: requested 8656 0 bytes for Chunk::new. Out of swap space? Press any key to continue . . .
A JIRA has been created as suggested: https://jira.jboss.org/jira/browse/JBAS-7284 -
21. Re: OutOfMemoryError in JBoss 5.01
smarlow Sep 22, 2009 11:40 PM (in response to yongz)3. -Xms768m -Xm768m -XX:MaxPermSize=256m
For now we mitigate the issue with the above memory settings, but we cannot stay with this heap size for long.
This is similar to other general native memory heap allocation errors. You are running out of native heap space. Your application needs more than 768m of Java heap but the native heap is probably overwhelmed for various reasons.
Do you have a way to test with Java 6? Try adding the "-XX:+UseParallelOldGC" option (use parallel GC for multiple threads) and see if that helps. This option is supported with Java 5 as well but is supposed to be faster with Java 6 (not fast enough with Java 5, enough said). This might help reduce enough memory pressure on the native heap. Try that and write back.
We should get you hooked up with our support organization. Getting a subscription will help you and help us (look at http://www.jboss.com/services/subscriptions/).
We can also hook you up with our consulting organization to work on reducing the Java memory used in your application (http://www.jboss.com/services/consulting/). -
22. Re: OutOfMemoryError in JBoss 5.01
peterj Sep 23, 2009 10:32 AM (in response to yongz)If you turn off the CMS collector (get rid of "-XX:+UseConcMarkSweepGC -XX:+UseParNewGC") does the error still occur? The CMS collector tends to do strange things with the heap - I suspect that you are not really running out of heap space but rather the young generation is not large enough to handle the thread-local allocation blocks. That is just a guess, only by tuning on some of the heap debugging options (such as -XX:+PrintHeapAtGC) would we be able to tell.
By the way, how many CPUs/cores or on your system? -
23. Re: OutOfMemoryError in JBoss 5.01
yongz Sep 30, 2009 2:31 AM (in response to yongz)Hi smarlow/peter,
Sorry, I have not watched this thread for a while because the problem was resolved by fallbacking to vfsjar from default vfszip :-)
Our application has nothing to do with the above memory issue, and it can be reproduced with bare JBoss components:
1. JBoss 5.0.1
2. JBoss-ws metro 3.1.0.GA
3. JBoss messaging 1.4.2.GA SP1Do you have a way to test with Java 6?
JBoss starts ok with java 6, but we did not test whether it can handle user loads.If you turn off the CMS collector (get rid of "-XX:+UseConcMarkSweepGC -XX:+UseParNewGC") does the error still occur?
Yes, the error still occurs, but it is much easier to reproduce when CMS collector is used.By the way, how many CPUs/cores or on your system?
4
We do not have any memory issue after fallback to vfsjar, even with CMS collector on.
We appreciate the quick response from Ales/jaikiran, and we are getting JBoss Enterprise subscription/support. -
24. Re: OutOfMemoryError in JBoss 5.01
pitani Jan 30, 2013 5:19 PM (in response to yongz)Hi, I am also experiencing same issues(OutOfMemoryError with Native Memory) while starting my application contain ear file size 46M. If I add -Djboss.vfs.forceVfsJar=true, then I am not seeing any issues. May I know what is the pros and Cons of using this flag? If you have already used this flag in your application, Can you please shed some light using this flag?