IBM Support

PM51151: WEBCONTAINER MEMORY LEAK IS SEEN WHEN APPLICATION USES THE ASYNCHRONOUS INVOCATION API.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Websphere Application Server Version 8.0.0.0
    Java Version 1.6.0
    Linux, version 2.6.18-238.el5
    
    Problem Description:
    
    Webcontainer leaks memory when application uses the Asynchronous
    invocation API.
    
    From the heapdumps we see the Webcontainer code is holding
    these scheduled threadpool Executor objects.
    
    com/ibm/ws/webcontainer/async/AsyncContextImpl$ExecutorFieldHold
    er
    1,036,864,512 (77%) [88] 6
    java/util/concurrent/ScheduledThreadPoolExecutor
    1,036,863,920 (77%) [16] 1
    java/util/concurrent/ScheduledThreadPoolExecutor$DelayedWorkQueu
    e
    1,036,863,904 (77%) [24] 3 java/util/concurrent/DelayQueue
    1,036,863,720 (77%) [24] 1 java/util/PriorityQueue
    1,036,863,696 (77%) [213,000] 36,537 array of
    java/lang/Object
    191,923,400 (14%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    53,008 (0%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    53,008 (0%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    53,008 (0%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    53,008 (0%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    53,008 (0%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    53,008 (0%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    53,008 (0%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    53,008 (0%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    53,008 (0%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    
    
    Basically, the webcontainer code:
    
    com/ibm/ws/webcontainer/async/AsyncContextImpl$ExecutorFieldHold
    er
    
    is holding around 53,008 of these scheduled threadpool Executor
    objects.
    Expanding one of these out we see the composition:
    
    53,008 (0%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    53,008 (0%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    53,008 (0%) [40] 2
    java/util/concurrent/ScheduledThreadPoolExecutor$ScheduledFuture
    Task
    52,968 (0%) [48] 2 java/util/concurrent/FutureTask$Sync
    52,920 (0%) [16] 1
    java/util/concurrent/Executors$RunnableAdapter
    52,904 (0%) [16] 2
    com/ibm/ws/webcontainer/async/AsyncTimeoutRunnable
    52,832 (0%) [104] 10
    com/ibm/ws/webcontainer/async/WSAsyncContextImpl
    26,600 (0%) [56] 7
    com/ibm/ws/webcontainer/srt/SRTServletRequest
    25,920 (0%) [144] 10
    com/ibm/ws/webcontainer/srt/SRTServletRequest$SRTServletRequestH
    elper
    24,824 (0%) [48] 3 java/io/BufferedReader
    16,400 (0%) [16,400] 0 char[]
    8,376 (0%) [24] 2 java/io/InputStreamReader
    8,376 (0%) [24] 2 java/io/InputStreamReader
    648 (0%) [40] 1 java/util/HashMap
    200 (0%) [40] 1 java/util/Hashtable
    104 (0%) [40] 1 java/util/Hashtable
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  IBM WebSphere Application Server version    *
    *                  8.0 user of Asynchronous Servlet.           *
    ****************************************************************
    * PROBLEM DESCRIPTION: Heavy usage of asynchronous servlet     *
    *                      applications can cause an Out of        *
    *                      Memory (OOM) exception.                 *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    A scheduled task is created and added to a queue before
    dispatching to a different resource in the asynchronous
    servlet application. When the dispatched asynchronous servlet
    is completed or timed out, its task is canceled and supposedly
    removed from the queue by the Java Virtual Machine (JVM)
    worker threads.  When the application server is under load,
    the worker threads might be too busy and do not remove the
    canceled tasks in a timely manner; thus causing them to be
    accumulated in the queue and holding up the memory. Eventually
    the OOM can occur.
    

Problem conclusion

  • The WebContainer code was modified to actively remove the
    canceled tasks from the queue instead of waiting for the JVM
    worker threads to purge them. There are two new WebContainer
    custom properties which are introduced by this APAR:
    
    com.ibm.ws.webcontainer.asyncMaxSizeTaskPool = 5000 (default)
    com.ibm.ws.webcontainer.asyncPurgeInterval = 30000 (default in
    milliseconds)
    
    
    The WebContainer will purge the queue once per interval when
    the size of the queue is greater than the max pool size.
    
    
    Please refer to the following technote for instructions on
    enabling WebContainer custom properties:
    http://www.ibm.com/support/docview.wss?rss=180&uid=swg21284395
    
    The fix for this APAR is currently targeted for inclusion in
    fixpack 8.0.0.3
    Please refer to the recommended updates page for delivery
    information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM51151

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-10-28

  • Closed date

    2011-11-30

  • Last modified date

    2012-03-09

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R800 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 October 2021