java - Synchronized Classloader calls from Hibernate -


Text after "

The way we start generating hibernate (in the least parts) is having a display problem in our project Uses classloader's It was discovered in Java thread dump which was taken during high load testing on our internal environment. JVM Throwed Weblogic's JVM managed server which runs the application, and until the monitoring dashboard thread alone and the user request is pending, the dump has been moved

Example:.

  "[ACTIVE] ExecuteThread: '126 to' queue: 'weblogic.kernel.Default (self-tuning)" daemon prio = 10 TID = 0x00007f2fe9486000 NID = Waiting for entry to monitor 0x663b [0x00007f2faeae6000] java.lang.Thread.State: -; 0x000000078c0d76b0 & gt; java.lang.ClassLoader.loadClass (ClassLoader.java:405) waiting on lock lock (on object monitor); On weblogic.utils.classloaders.GenericClassLoader.loadClass (GenericClassLoader.java:178) on java.lang.ClassLoader.loadClass (ClassLoader.java:358) (a weblogic.utils.classloaders.GenericClassLoader) org.hibernate.internal.util .ReflectHelper.classForName (ReflectHelper.java:187) at org.hibernate.internal.util. ReflectHelper.getConstantValue (ReflectHelper.java .78) on org.hibernate.hql.internal.ast.QueryTranslatorImpl $ JavaConstantConverter.handleDotStructure (QueryTranslatorImpl.java: 592) org.hibernate.hql.internal.ast.QueryTranslatorImpl $ JavaConstantConverter.visit (QueryTranslatorImpl .java: 587)  

We can see in these thread dumps (using on Samurai / TDA) that it seems that at any given time there are so many threads that Waiting for lock on classloader This classloader, provided by WLS, is being synchronized - which locking / Bluetooth Interpretation of locking thread pattern that is ...

It seems that uses Clasloder to evaluate expressions in Hibernate queries so I'm not sure that Clasloder really any new Loads the squares.

The problem is the number of calls to the classloader which runs at all times ... sometimes I have seen 30% of the total number of total loads (~ 30-40 + our 130) Wait to get a Classloader Lock!

-> It seems that efforts to Dbluels Clasloder sync too much internal overhead when a high number of threads high user service load (ie many Hibernate queries) is Are there.

Is this behavior normal or are we doing something wrong?

Now the issue of this synchronized classloader seems to be the main reason, which limits our application, which can lead to insulting performance under heavy load. In addition, if we increase the CPU / memory or the various WLS specific pools (like EJB / JDBC connection / ...), then the problem does not go away - because it is specific to the whole JVV, we run our app. .

I highly appreciate your input on the subject.


Google was showing that we are not the first person to face this problem (for example, or), but any real solution to this problem / There is no explanation.

The problem is that application programmers think that class.forName () And Classloader.loadClass () is a cheaper operation like a new object () .


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -