JMX线程卡在ClientNotifForwarder上

时间:2009-02-19 18:35:50

标签: java multithreading jmx

我们的应用程序连接到几个jmx代理(大约50个)以频繁间隔轮询jmx数据。一段时间(大约一天)后,应用程序变得反应迟钝。我们查看了线程转储并看到大量线程卡在ClientNotifForwarder上。

例如:

"ClientNotifForwarder-50" daemon prio=3 tid=0x09aa3800 nid=0x330 runnable [0xd3a90000..0xd3a90c70]
java.lang.Thread.State: RUNNABLE
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    - locked <0xe2538af0> (a java.io.BufferedInputStream)
    at java.io.DataInputStream.readByte(DataInputStream.java:248)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:195)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
    at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
    at javax.management.remote.rmi.RMIConnectionImpl_Stub.fetchNotifications(Unknown Source)
    at javax.management.remote.rmi.RMIConnector$RMINotifClient.fetchNotifs(RMIConnector.java:1291)
    at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.fetchNotifs(ClientNotifForwarder.java:503)
    at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.run(ClientNotifForwarder.java:395)
    at com.sun.jmx.remote.internal.ClientNotifForwarder$LinearExecutor$1.run(ClientNotifForwarder.java:83)

对于确定根本原因的任何帮助表示赞赏......

谢谢, 拉加

1 个答案:

答案 0 :(得分:0)

尝试从命令行设置连接和读取超时属性。

sun.net.client.defaultConnectTimeout
sun.net.client.defaultReadTimeout

http://docs.oracle.com/javase/6/docs/technotes/guides/net/properties.html

假设你有足够的再审机制。