2 Replies Latest reply on Sep 4, 2008 9:36 AM by Vratislav Kuzela

    JAX-WS 2.1 and JBoss 4.2.2

    Vratislav Kuzela Newbie

      Hi,

      I'm deploying our J2EE application with JAX-WS 2.1 on JBoss 4.2.2GA. Unfortunately I have suspition that JBoss and JAX-WS cause memory leaks because approximately after 24 hours with heavy load, JBoss crashes with OutOfMemory exception. And this happens when JAVA tries to allocate more than 2 GB of ram (Windows server 2003, 4 GB ram, 2x quad core Intel Xeon).

      When I started my investigation, I used native memory profiler which showed that large memory is allocated from zip.dll. This is why I decided to take a look at class loader.

      I found that in runtime a lot of classes are loaded by __JVM_DefineClass__ and org.jboss.mx.loading.UnifiedClassLoader3.

      Below you can see how the number of loaded classes grows and also you can see classes which are loaded more than once. Also there is a link to screenshot from performance monitor with memory graphs http://www.3dspace.cz/perfmon.jpg.


      JBoss started
      Total classes: 8829
      Class: 'com.upek.services.webutils.ServiceStatusServlet' count: 3x
      Class: 'org.jboss.mq.il.http.servlet.HTTPServerILServlet' count: 2x

      After 1 Operation
      Total classes: 10501
      Class: 'com.upek.services.webutils.ServiceStatusServlet' count: 3x
      Class: 'org.jboss.mq.il.http.servlet.HTTPServerILServlet' count: 2x


      After 25minuts of running
      Total classes: 23441
      Class: 'com.upek.services.crs.AuthChallenge$JaxbAccessorF_string2' count: 42671x
      Class: 'com.upek.services.prov.ActivationResponse$JaxbAccessorF_transactionPacket' count: 42669x
      Class: 'com.upek.services.prov.KeyProvision$JaxbAccessorF_string5' count: 42667x
      Class: 'com.upek.services.crs.AuthChallengeResponse$JaxbAccessorF_result' count: 21336x
      Class: 'com.upek.services.prov.Activate$JaxbAccessorF_arg3' count: 21335x
      Class: 'com.upek.services.prov.KeyProvisionContinueResponse$JaxbAccessorF_result' count: 21334x
      Class: 'com.upek.services.webutils.ServiceStatusServlet' count: 3x
      Class: 'org.jboss.mq.il.http.servlet.HTTPServerILServlet' count: 2x

      After 1hour of running
      Total classes: 45340
      Class: 'com.upek.services.crs.AuthResponseResponse$JaxbAccessorF_result' count: 107913x
      Class: 'com.upek.services.prov.ActivationResponse$JaxbAccessorF_transactionPacket' count: 107893x
      Class: 'com.upek.services.prov.KeyProvision$JaxbAccessorF_string5' count: 107891x
      Class: 'com.upek.services.prov.DeviceInfo$JaxbAccessorF_publicX509SwEncryptKey' count: 107890x
      Class: 'com.upek.services.prov.GetDeviceInfo$JaxbAccessorF_string2' count: 107889x
      Class: 'com.upek.services.prov.IsActivated$JaxbAccessorF_string2' count: 107887x
      Class: 'com.upek.services.crs.AuthChallengeResponse$JaxbAccessorF_result' count: 53957x
      Class: 'com.upek.services.prov.ActivateContinue$JaxbAccessorF_arrayOfbyte2' count: 53947x
      Class: 'com.upek.services.prov.KeyProvision$JaxbAccessorF_arrayOfbyte1' count: 53946x
      Class: 'com.upek.services.prov.KeyProvisionContinueResponse$JaxbAccessorF_result' count: 53945x
      Class: 'com.upek.services.prov.GetDeviceInfoResponse$JaxbAccessorF_result' count: 53944x
      Class: 'com.upek.services.webutils.ServiceStatusServlet' count: 3x
      Class: 'org.jboss.mq.il.http.servlet.HTTPServerILServlet' count: 2x