I have a Solaris 10 Zone with 1GB dedicated RAM and 2GB swap.
I has a Solaris SMF task to enable and disable a current Glassfish instance. The instance is basically set with -Xmx384M, this gives us more than enough room. After running prstat, I see that RSS is around 440M total for the instance.
But then when I try to shut the instance down, using "svcadm disable galssfish", the service goes in to maintenance mode because asadmin fails to start. Simply put, it can't get enough heap/swap to start up. IOException Not Enough Space, errno=12.
One supposition is that the JVM is seeing that it's on a "large server" (which it is, it's got like 16GB on it), and the JVM is trying allocated a huge chunk of that space for itself, but since it's in a 1GB zone, it immediately fails.
That would be all well and good if it did this consistently, but it doesn't. I've see it happen even after everything in the the Zone has been stopped (well, "everything" being the app server, nothing else takes enough space to matter). And if asadmin was trying to grab, say, 10GB of RAM in a 1GB zone, it would have that problem whether the app server is running or not.
And, not being fully up to speed on the inner details of zones, I'd like to think if a process asked for "how much RAM do we have", the zone wouldn't report back "all of it", when it's got its own little smaller slice of heaven allocated to it.
So I'm not convinced that's soley the issue.
This obviously is some twisted convergence of issues with Solaris Zone, Java 6, and Glassfish, but hopefully someone else has had this issue here and can send a pointer.
Thanx!
[Message sent by forum member 'whartung' (whartung)]
http://forums.java.net/jive/thread.jspa?messageID=288530