IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Service running too long and causing out of memory

    Posted Wed February 24, 2010 12:41 PM

    Hi,
    My server is running out of memory, because there are hung threads by running long services under service usage.

    Can you tell me what could be the possible reasons for this. I have checked my service and found that its working with huge data in the memory (say more than 500k) and also doing things like append to string for each record, and not dropping the values from the pipeline.

    Is there any best practices to avoid long running services?

    Thanks!


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Service running too long and causing out of memory

    Posted Wed February 24, 2010 03:54 PM

    The usual cause of hung threads is programming bugs in the services.

    Also, working with large documents and not dropping vars from the pipeline when no longer needed can be problematic.

    Did you mean “append to string” or is it “append to string list?” Depending on the IS version and the JVM, the append to list services can become very slow after a few hundred elements are added.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Service running too long and causing out of memory

    Posted Wed February 24, 2010 06:07 PM

    Hi,

    Just to add to Rob’s response.

    The webMethods IS is a JVM.
    A string is a class of it own and not a primitive data type ( like int,float…etc). when a String is created, JVM allocates memory for the object, and stored in a reference, say ‘X’. when you create a new string object and assign to the reference ‘X’, the memory allocated for the previously created string will still exist on the JVM memory. For any string object the allocated memory has to be deallocated in order to prevent memory leaks.

    Thanks and Regards,
    Rajkumar


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Service running too long and causing out of memory

    Posted Thu February 25, 2010 02:56 PM

    Hi,

    All were saying of deallocation… but how that thing is done ?? :frowning:


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Service running too long and causing out of memory

    Posted Thu February 25, 2010 03:56 PM

    In FLOW services, drop variables that are no longer useful as soon as possible.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services