We've been wrestling with issues surrounding deadlocking/blocking on synchronized method access under load in the saxon and eip API's. I first put in a manual throttling/sleep to keep threads from being aligned too closely to each other, then my teammate showed me the confiurable mbean props for the LifeCycle properties of the eip and saxon services.
Putting in delays of 250 ms-500 ms helps. But the core issue seems to be mis-use of synchronized API calls in ServiceMix. Here are a couple examples: net.sf.saxon.om.NamePool.allocate(...) net.sf.saxon.om.NamePool.allocateNameSpaceCode(...) Simple fix...should be checking to see if the namespace exists before calling 'allocate' getNamesSpaceCode(...string...) returns '-1' if it doesn't. They clearly should be testing that before calling the synchronized blocks. ServiceMix code should not be calling synchronized method unless it has to. In these cases, I think checks need to be made before calling these allocate methods. I believe the name-spaces are already allocated, and therefore the synchronized call is not needed at all. I'm not a contributor and don't buidl servicemix myself, otherwise I'd be happy to take this further and actually try to fix the code. My throttling I considered a hack, to find then the throttling as a 'feature' made me kind of sad because the root cause of deadlocking/blocking would be better to be addressed. Props to "Yourkit", as without that I would not have seen these issues at all. -- View this message in context: http://old.nabble.com/3.3-throttling-needed%2C-but-API-use-may-be-buggy-to-begin-with-tp27772120p27772120.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
