I have been trying to migrate from 4.0.4.GA to 6.0.0.Final for a few days now. I have resolved many issues on the way. When I get stuck, I tend to ask the question here, get no response, find the answer myself, and post that answer. I'm hoping that someone out there might be able to offer some useful advice on this one though.
I had been starting JBoss 4.0.4 with Xms/x = 768m. That was sufficient for it to start and run a reasonably hefty application.
With JBoss 6.0.0.Final, I can see lots of java.lang.OutOfMemory errors in boot.log just trying to start up. I increased Xms/x to 1280m, but still lots of OutOfMemory errors.
As I am working on an Amazon EC2 m1.small instance with 1.7GB of memory, I don't have a lot more headroom. So I could move to a box with more memory available, but I am very suspicious that something is wrong. I can't believe that 1280 MB isn't enough to even start JBoss 6.0.0.Final. Could I therefore check what are other proples experience with the memory requirements of JBoss 6.0.0.Final - is 1280 simply not enough?
Here is an eample of one of the many errors in boot.log:
10:29:35,557 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:jndiName=ejb/MySession,service=EJB state=Create mode=Manual requiredState=Installed: java.lang.OutOfMemoryError: PermGen space
Having increased the Xms/x to 2048 and still getting the errors it hit me that the problem was the PermGen space - as indicated by the error message (doh!). When I specified -XX:MaxPermSize=256m (as it is in run.conf) then the OutOf Memory errors disappeared.