Grails/Groovy on heavy load: String.indexOf locks the site?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Grails/Groovy on heavy load: String.indexOf locks the site?

Fedor Belov
We've fixed 2-4 major performance problems in Grails/Groovy. It works for months without any problems... And after months our server blocked with A LOT OF threads with the same stacktrace:

"http-nio-8080-exec-11" daemon prio=10 tid=0x0000000005205800 nid=0x13d8 waiting for monitor entry [0x00002ae924474000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at org.codehaus.groovy.reflection.GeneratedMetaMethod$Proxy.proxy(GeneratedMetaMethod.java:78)
        - waiting to lock <0x0000000600457e98> (a org.codehaus.groovy.reflection.GeneratedMetaMethod$Proxy)
        at org.codehaus.groovy.reflection.GeneratedMetaMethod$Proxy.isValidMethod(GeneratedMetaMethod.java:65)
        at groovy.lang.MetaClassImpl.chooseMethodInternal(MetaClassImpl.java:2818)
        at groovy.lang.MetaClassImpl.chooseMethod(MetaClassImpl.java:2810)
        at groovy.lang.MetaClassImpl.getMethodWithoutCaching(MetaClassImpl.java:1290)
        at groovy.lang.MetaClassImpl.pickMethod(MetaClassImpl.java:3359)
        at groovy.lang.MetaClassImpl.findOwnMethod(MetaClassImpl.java:3300)
        at groovy.lang.MetaClassImpl.searchInterfacesForMetaMethod(MetaClassImpl.java:3290)
        at groovy.lang.MetaClassImpl.findMethodInClassHierarchy(MetaClassImpl.java:3203)
        at groovy.lang.MetaClassImpl.findMethodInClassHierarchy(MetaClassImpl.java:3192)
        at groovy.lang.MetaClassImpl.findMethodInClassHierarchy(MetaClassImpl.java:3192)
        at groovy.lang.MetaClassImpl.findMethodInClassHierarchy(MetaClassImpl.java:3192)
        at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:825)
        at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1131)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1084)
        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1106)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at java_lang_String$indexOf.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(AbstractCallSite.java:82)
        at org.grails.plugin.resource.ResourceTagLib.resolveLinkUriToUriAndResource(ResourceTagLib.groovy:552)

How can we fix this problem?