Discussions

Performance and scalability: OutOfMemoryError, ClassCastException and PeerGoneException

  1. We have 4 instance of WLS in a cluster using in memory replication. We have discovered two problem with JDK 1.3.1/WLS 5.1 SP12 combinations. These issues we had with JDK 1.3.1/WLS 5.1 SP9, with an Exception thrown by rmi server: java.lang.ClassCastException which leads to a Peer Gone Exceptions and the OutOfMemoryError. We have done some research and has discovered that the possible cause of this ClasCastException is due to multiple class loaders. There looks to be a conflict in the classpaths, system and weblogic. Has anyone run across this exception?

    The OutOFMemoryError is somewhat screwy where it appears you have plenty of memory but you get this error. The exception occurs when the PermGeneration memory is exhausted. This memory can be increased with the -XXMaxPermSize command line arg. But this will only delay the failure according to the information we have now. We have decided to increase the PermGeneration to 256m using the -XXMaxPermSize argument and lowering the stack size to 128k using the -Xss option. Does the JVM stacks reside in the PermGeneration or the heap? Are we going in the right direction?
     
     
     
     
     

  2. One reason for ClassCast exception in wls 5.1 ( which I have come across ) is due to the fact that the session variables are not serializable.

    Say you are putting an object of class A into httpSession. A should implement Serializable.

    This can be one reason.
  3. The common PeerGoneException that I see is when a multicast to find the peer occurs and the peer happens to be doing a gc[1] at the time (therefore, unable to answer the request).

    Perhaps you're running into multiple issues @ once?

    m.