|
最近在研究tomcat的线程监控问题,遇到一些问题,看不太明白,请各路知情者赐教!!
从jvisualvm中进行dump thread之后,得到如下结果:
问题1:
"JMX server connection timeout 405" - Thread t@405
java.lang.Thread.State: TIMED_WAITING on [I@1b995b8 at java.lang.Object.wait(Native Method)
at com.sun.jmx.remote.internal.ServerCommunicatorAdmin$Timeout.run(ServerCommunicatorAdmin.java:150)
at java.lang.Thread.run(Thread.java:595)
这里的 [I@1b995b8是代表什么意思呢?"
问题2:
RMI TCP Connection(317)-192.168.5.250" - Thread t@401
java.lang.Thread.State: TIMED_WAITING on com.sun.jmx.remote.internal.ArrayNotificationBuffer@e03500
at java.lang.Object.wait(Native Method)
at com.sun.jmx.remote.internal.ArrayNotificationBuffer.fetchNotifications(ArrayNotificationBuffer.java:344)
at com.sun.jmx.remote.internal.ArrayNotificationBuffer$ShareBuffer.fetchNotifications(ArrayNotificationBuffer.java:122)
at com.sun.jmx.remote.internal.ServerNotifForwarder.fetchNotifs(ServerNotifForwarder.java:169)
at javax.management.remote.rmi.RMIConnectionImpl.fetchNotifications(RMIConnectionImpl.java:1215)
at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
怎么才能知道这里面的“com.sun.jmx.remote.internal.ArrayNotificationBuffer@e03500
”是被哪个进程拥有了呢?
问题3:
"http-8443-19" - Thread t@165
java.lang.Thread.State: BLOCKED on java.lang.Class@f23b3c owned by: Prototyper
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at com.catt.cwf.database.DatabaseConnection.getConnection(DatabaseConnection.java:28)
at com.catt.cwf.database.SybaseDB.<init>(SybaseDB.java:41)
at com.catt.cwf.database.FactoryDB.getCWSM(FactoryDB.java:47)
at pub.source.DatabaseUtil.logUpdateDateBase(DatabaseUtil.java:212)
at pub.source.LogOperateUtil.save(LogOperateUtil.java:233)
at pub.source.LogOperateUtil.logSQLToDb(LogOperateUtil.java:279)
但是prototyper的线程信息里面又没有看到上面提示的那个class类,那应该怎么才能知道引起这么多为获得连接而处于block状态的线程的原因呢?:
"rototyper" - Thread t@32
java.lang.Thread.State: RUNNABLE
at sun.net.spi.DefaultProxySelector$2.run(DefaultProxySelector.java:186)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:359)
at java.net.Socket.connect(Socket.java:524)
at java.net.Socket.connect(Socket.java:474)
at java.net.Socket.<init>(Socket.java:371)
at java.net.Socket.<init>(Socket.java:184)
at com.sybase.jdbc3.timedio.RawDbio.doConnect(Unknown Source)
at com.sybase.jdbc3.timedio.InStreamMgr.<init>(Unknown Source)
at com.sybase.jdbc3.tds.Tds.login(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.<init>(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.<init>(Unknown Source)
at com.sybase.jdbc3.jdbc.SybDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConnectionBuilder.java:39)
at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159)
at org.logicalcobwebs.proxool.Prototyper.sweep(Prototyper.java:102)
at org.logicalcobwebs.proxool.PrototyperThread.run(PrototyperThread.java:44)
另外,有谁知道通过线程具体怎么分析内存泄露和连接池满的具体过程吗??不胜感激 |
|