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)
…
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.
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.
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.
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.
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?