I'm developing an OSGi application, and I put the bundles in Virgo. But I have a problem, when I put a lot of times this bundle in Virgo (5 times at lest) it trow a error and then it going down.
This is the error message:
java.lang.OutOfMemoryError: PermGen space
Dumping heap to /home/user/Virgo/virgo-tomcat-server-3.0.2.RELEASE/serviceability/heap_dump.hprof ...
Unable to create /home/user/Virgo/virgo-tomcat-server-3.0.2.RELEASE/serviceability/heap_dump.hprof: File exists
There are 8 bundles developing by me. 4 are normal bundles and the rest are WAB (Web application bundles). Also I'm using virgo Snaps.
Hristo Iliev Messages: 156 Registered: May 2010 Location: Sofia, Bulgaria
If the OOM happens after several deployments this most probably means that some of the objects are left registered and kept in some structure (map, set, ...)
You can try to increase the VM's perm area size that holds class definitions. The VM parameter you need is -XX:MaxPermSize=<size>M. Change this in the Virgo's startup scripts or just set JAVA_OPTS environment variable.
The increased perm may solve the problem for a while but if the memory keeps growing then you'll need to check if there is some leak.