Atomikos Forum

Thread blocked on java.util.logging.ConsoleHandler

Hi!

I've using atomikos (3.5.5) with Spring (2.5.6) + Hibernate (as a JPA provider) + Tomcat + SpringSource dm Server. My services are exposed as a restful service (Apache CXF).
After I moved from JOTM to atomikos performance of my services droped from 100 request per seconds to 20. I played with atomikos settings (enable_logging=false and console_log_level=WARN) and this gave me 55 r/s still less that I want.
I connected to my server using jconsole ale jvisualvm and I saw that many of tomcat's threads were blocked on java.util.logging.ConsoleHandler, examples:

java.util.logging.StreamHandler.publish(StreamHandler.java:174)
java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
java.util.logging.Logger.log(Logger.java:458)
org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:587)
org.slf4j.impl.JDK14LoggerAdapter.info(JDK14LoggerAdapter.java:284)
com.atomikos.diagnostics.Slf4jConsole.println(Slf4jConsole.java:81)
com.atomikos.diagnostics.CascadedConsole.println(CascadedConsole.java:111)
com.atomikos.icatch.imp.BaseTransactionManager.printMsg(BaseTransactionManager.java:166)
com.atomikos.icatch.imp.BaseTransactionManager.createCompositeTransaction(BaseTransactionManager.java:543)
com.atomikos.icatch.jta.TransactionManagerImp.begin(TransactionManagerImp.java:437)
com.atomikos.icatch.jta.TransactionManagerImp.begin(TransactionManagerImp.java:414)
com.atomikos.icatch.jta.UserTransactionImp.begin(UserTransactionImp.java:154)
......


Stack trace:
java.util.logging.StreamHandler.publish(StreamHandler.java:174)
java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
java.util.logging.Logger.log(Logger.java:458)
org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:587)
org.slf4j.impl.JDK14LoggerAdapter.info(JDK14LoggerAdapter.java:284)
com.atomikos.diagnostics.Slf4jConsole.println(Slf4jConsole.java:81)
com.atomikos.diagnostics.CascadedConsole.println(CascadedConsole.java:111)
com.atomikos.icatch.system.Configuration.log(Configuration.java:572)
com.atomikos.icatch.system.Configuration.logInfo(Configuration.java:530)
com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:71)


Even if I set log level to WARN atomikos logs some information about each transaction (and other stuff) on stderr (to file), after few minutes log file occupied 100MB!!
Is there any way to disable all logs? I tried with NO log level but there are only avaiable DEBUG, INFO and WARN.
For me this is huge performance issue.

Ofcourse I can modify com.atomikos.diagnostics.Slf4jConsole class and method println() to cut invocation chain but this is very ugly solution and I prefer to aviod this.

Thanks in advance!
Jakub Bialek Send private email
Thursday, July 02, 2009
 
 
Hi,

We will look into this - thanks for reporting!

Guy
Guy Pardon Send private email
Monday, July 06, 2009
 
 
I had commented few lines of code and built custom atomikos jars. Performance of my service raised from 55 request per second to 130-150 rps and now bottle neck is not atomikos but performance of my hardware, no more blocked threads :).

I think it will be nice to have ERROR and NO log level and when messages of given level are disabled invocation chain should end before their reach java.util.logging.Logger or org.slf4j.impl.JDK14LoggerAdapter
Jakub Bialek Send private email
Monday, July 06, 2009
 
 
Hi,

Thanks. Can you confirm that the original problem did not involve DEBUG logs in your native JDK logging config? Otherwise, the problem could also be solved by disabling those (would you have time to try that?).

Otherwise, what lines did you comment out?

Thanks
Guy Pardon Send private email
Tuesday, July 07, 2009
 
 
Hi!

Due to some "FogBugz Internal Error" I sent you private message.
Jakub Bialek Send private email
Wednesday, July 08, 2009
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics