This discussion is archived
0 Replies Latest reply: Jan 11, 2013 11:59 AM by 984415 RSS

Custom Work Manager on the Servlet level producing OutofMemory Errors

984415 Newbie
Currently Being Moderated
I have tried to create a custom work manager for my web app for weblogic 10.3.5 to hvae throttling control and its showing correctly in the console too. In fact it starts rejecting the concurrent requests which are >12 with 503 http status code. but apparently it start throwing the OutofMemory Exception after some time. After looking into the issue and comparing the two heap dump snapshots, we found that weblogic is not crearing the rejected requests from its memory, hence more the rejected requests, more we are moving towards seeing the OutofMemory exception.

See the below heapdump snippet, in this case rejected requested were 3177,since server started up, but those objects were never cleared up. Not sure that why weblogic needs to keep the rejected requests/responses in the memory.

Any help is greatly appreciated.

HeapDump snapshot -->
weblogic.servlet.internal.AttributesMap 3177
weblogic.servlet.internal.RequestHeaders 3177
weblogic.servlet.internal.ServletRequestImpl$SessionHelper 3177
weblogic.servlet.internal.WebAppServletContext 3177
java.lang.Class 3177
weblogic.servlet.internal.ServletRequestImpl$RequestParameters 3177
weblogic.servlet.internal.ServletStubImpl 3177
weblogic.servlet.logging.HttpAccountingInfoImpl 3177
weblogic.servlet.internal.ServletRequestImpl$RequestInputHelper 3177
weblogic.servlet.internal.ServletInputStreamImpl 3177
weblogic.servlet.internal.ServletResponseImpl 3177
weblogic.servlet.internal.VirtualConnection 3177
weblogic.work.ServerWorkManagerImpl 3176
weblogic.work.FairShareRequestClass 3176

Snippet of weblogic.xml -->
               <work-manager>
                    <name>custom_workmanager</name>
                    <max-threads-constraint>
                    <name>MaxThreadsCount</name>
                    <count>8</count>
                    </max-threads-constraint>
                    <capacity>
                    <name>Capacity</name>
                    <count>12</count>
                    </capacity>
               </work-manager>     


Snippet of web.xml -->
<servlet>
<servlet-name>AFNetworkProfileServiceServlethttp</servlet-name>
<servlet-class>com.qwest.ngs.afnetworkprofilews.webservice.AFNetworkProfileServicePortTypeImpl</servlet-class>
     <init-param>
     <param-name>wl-dispatch-policy</param-name>
     <param-value>custom_workmanager</param-value>
     </init-param>
<load-on-startup>0</load-on-startup>
</servlet>

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points