Could your Remote server be started with more mem then your Managed?
Default in Managed in 7.0.0 is https://github.com/jbossas/jboss-as/blob/574fe78e47680333187f9bf6d32d36217120cdff/arquillian/container-managed/src/main/java/org/jboss/as/arquillian/container/managed/ManagedContainerConfiguration.java#L38
Absolutely. I tried to run this down by setting my arquillian.xml to:
<container qualifier="jboss7" default="true">
<property name="argLine">-Xms64m -Xmx1024m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000</property>
Also tried using jvmArguments instead of argLine.
When I do use javaVmArguments, I notice the arguments specified in this property don't appear in the container setup output, e.g.:
Mar 11, 2012 7:14:40 PM org.jboss.as.arquillian.container.managed.ManagedDeployableContainer startInternal
INFO: Starting container with: [java, -Djboss.home.dir=/opt/jboss702, -Dorg.jboss.boot.log.file=/opt/jboss702/standalone/log/boot.log, -Dlogging.configuration=file:/opt/jboss702/standalone/configuration/logging.properties, -Djboss.modules.dir=/opt/jboss702/modules, -jar, /opt/jboss702/jboss-modules.jar, -mp, /opt/jboss702/modules, -logmodule, org.jboss.logmanager, -jaxpmodule, javax.xml.jaxp-provider, org.jboss.as.standalone, -server-config, standalone.xml]
Should they appear here?
Yep, sure enough. Watched the execution from VisualVM and MaxPermSize isn't getting set and quickly runs out. Why it's running out so fast all of a sudden is a mystery to me. Could this be caused by including too many unused classes with test WARs by loading them by package instead of individually?
Thanks -- that did it. Wish I had a better understanding of PermGen. It appears to grow steadily and never drops while my tests run which leads me to believe I'll see this error when 512m is no longer enough PermGen space...
PermGen normally means there is a leak 'somewhere' that prevents the JVM from cleaning up. That being your code, arquillian, junit, lib x, lib z, the app server etc.. something probably holds a ref to a class in the deployments classloader that prevents it from being cleaning up..