webMethods

webMethods

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
Expand all | Collapse all

Service cache causing locked threads

  • 1.  Service cache causing locked threads

    Posted Wed August 06, 2014 05:19 PM

    In IS 9.5, I am calling a service that has service caching enabled, properties Stateless=True and Cache results=True. During testing I performed a JVM thread dump and noticed many threads blocked.

    Is there any way to get the service cache to work without locking? This is killing performance when many concurrent requests are being processed.

    Running thread

    at net.sf.ehcache.Cache.get(Cache.java:1590)
    at net.sf.ehcache.Cache.get(Cache.java:1557)
    at com.wm.app.b2b.server.ostore.EhcacheStore.load(EhcacheStore.java:104)
    - locked <0x5ef5c1ca> (a com.wm.app.b2b.server.ostore.EhcacheStore)
    at com.wm.app.b2b.server.ostore.CacheEntryList.access(CacheEntryList.java:75)
    at com.wm.app.b2b.server.ostore.ServiceCacheImpl.get(ServiceCacheImpl.java:124)
    - locked <0x32c9387b> (a com.wm.app.b2b.server.ostore.ServiceCacheImpl)
    at com.wm.app.b2b.server.ostore.ServerCache.get(ServerCache.java:385)
    at com.wm.app.b2b.server.CacheManager.invoke(CacheManager.java:196)

    Blocked thread (there are many of these)

    at com.wm.app.b2b.server.ostore.ServiceCacheImpl.get(ServiceCacheImpl.java:111)
    - waiting on <0x32c9387b> (a com.wm.app.b2b.server.ostore.ServiceCacheImpl) owned by thread=“HTTP Handler 10.2.6.225” Id=28805
    at com.wm.app.b2b.server.ostore.ServerCache.get(ServerCache.java:385)
    at com.wm.app.b2b.server.CacheManager.invoke(CacheManager.java:196)


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


  • 2.  RE: Service cache causing locked threads

    Posted Thu August 07, 2014 06:32 AM

    Never faced this before… I can suggest you can contact SAG global support with Java JVM thread dump. They can suggest you something.

    Please let me know once you hear anything from them.


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


  • 3.  RE: Service cache causing locked threads

    Posted Thu August 07, 2014 11:54 AM

    What IS memory you have set in the setenv.sh/bat file to handle the performance load for your IS to handle?

    Also do you have any specific reason for that service cache enabled to true?

    Also please touch base with SAG support with any core/thread heap dumps and they can suggest better settings.

    HTH,
    RMG


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


  • 4.  RE: Service cache causing locked threads

    Posted Thu August 07, 2014 12:42 PM

    Thanks, I’ll open a support incident with SAG and include the thread dumps.

    The heap size for the JVM is 8GB. There seems to be plenty of free memory available.

    The service in which caching is enabled reads an XML file from disk and converts it to a document. To avoid disk i/o for each service call we enabled the service cache.

    I will post an update once I hear back from SAG support.


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


  • 5.  RE: Service cache causing locked threads

    Posted Thu August 07, 2014 03:05 PM

    Got it.

    Any ways just a side node 6GB is the max you can give for any IS to handle JVM heap to my knowledge…

    OK please update this thread back with findings.

    HTH,
    RMG


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


  • 6.  RE: Service cache causing locked threads

    Posted Fri August 08, 2014 02:25 AM

    Hi Brian,

    What is the value of watt.server.threadPool. Sometime we face issue in thread if we have low value. Check it out in server.cnf file.


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


  • 7.  RE: Service cache causing locked threads

    Posted Fri August 08, 2014 11:26 AM

    Hi Lance,

    The server thread pool is set to a max of 7500. This is higher than what we have set in production but we are in the process of performing stress tests and have been experimenting with different values. This just happens to be the current value in our test system.

    SAG support has been engaged. I will post any updates.

    Thanks,
    Brian


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


  • 8.  RE: Service cache causing locked threads

    Posted Fri August 08, 2014 11:33 AM

    You have more than required for server thread pool max 7500 interesting :smiley:
    what is minimum set to and you can check it from the Resources page.

    I am sure SAG support can assist you while peeking thru your specific environment and based on IS core/heap dumps you may have provided.

    HTH,
    RMG


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


  • 9.  RE: Service cache causing locked threads

    Posted Fri August 08, 2014 12:37 PM

    The minimum thread pool setting is 10. After performing more tests I have noticed that not all thread dumps show blocked threads. I am hoping support can tell what’s going on.


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


  • 10.  RE: Service cache causing locked threads

    Posted Fri August 08, 2014 03:25 PM

    Please raise the minimum to 50 or 100 also.

    Still I believe your maximum is very very high number to me.

    OK they might:

    HTH,
    RMG


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


  • 11.  RE: Service cache causing locked threads

    Posted Wed September 03, 2014 02:09 PM

    Since I could not reproduce the locked threads in the thread dumps with enough consistency, webMethods support said that the threads are most likely released quickly and that it was normal behavior.


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


  • 12.  RE: Service cache causing locked threads

    Posted Wed January 21, 2015 10:56 AM

    Have you got proper error handling in your cached service? Try to use debugLog service in your service catch sequence to see what error is being produced. Hard to see whats causing the problem. Can you explain what your service is doing?


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