Jetty多个接受器阻止等待锁定和对象被其他接受器锁定

时间:2016-05-12 15:55:46

标签: java multithreading jetty

我遇到一个问题,应用程序挂起,可能是由于Jetty线程被阻塞,但我不是100%肯定如何解释线程转储,如果正常观察到什么以及如何跳线接收器生命周期是。

这是我正在观察的线程转储的一个特定部分:

"qtp1291915867-82 Acceptor0 SelectChannelConnector@0.0.0.0:3581 STARTING" prio=5 tid=0x52 state=BLOCKED
    at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:281)
      - waiting to lock java.lang.Object@71918ba2 [owned by "qtp1291915867-84 Acceptor2 SelectChannelConnector@0.0.0.0:3581 STARTING" tid=0x54]
    at org.eclipse.jetty.server.nio.SelectChannelConnector.accept(SelectChannelConnector.java:97)
    at org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:833)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
    at java.lang.Thread.run(Thread.java:804)

"qtp1291915867-83 Acceptor1 SelectChannelConnector@0.0.0.0:3581 STARTING" prio=5 tid=0x53 state=BLOCKED
    at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:281)
      - waiting to lock java.lang.Object@71918ba2 [owned by "qtp1291915867-84 Acceptor2 SelectChannelConnector@0.0.0.0:3581 STARTING" tid=0x54]
    at org.eclipse.jetty.server.nio.SelectChannelConnector.accept(SelectChannelConnector.java:97)
    at org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:833)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
    at java.lang.Thread.run(Thread.java:804)

"qtp1291915867-84 Acceptor2 SelectChannelConnector@0.0.0.0:3581 STARTING" prio=5 tid=0x54 state=RUNNABLE (running in native)
    at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
    at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:305)
      - locked java.lang.Object@71918ba2
    at org.eclipse.jetty.server.nio.SelectChannelConnector.accept(SelectChannelConnector.java:97)
    at org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:833)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
    at java.lang.Thread.run(Thread.java:804)

"qtp1291915867-85 Acceptor3 SelectChannelConnector@0.0.0.0:3581 STARTING" prio=5 tid=0x55 state=BLOCKED
    at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:281)
      - waiting to lock java.lang.Object@71918ba2 [owned by "qtp1291915867-84 Acceptor2 SelectChannelConnector@0.0.0.0:3581 STARTING" tid=0x54]
    at org.eclipse.jetty.server.nio.SelectChannelConnector.accept(SelectChannelConnector.java:97)
    at org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:833)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
    at java.lang.Thread.run(Thread.java:804)

AFAIK,接受器的数量应该在1到1的CPU之间,所以我假设这是在4核CPU中运行,问题是,从码头的角度来看,其他接受器被阻止等待是正常的其他接受者资源?如果是的话,这个资源可能是什么?

我不是很喜欢Jetty,所以我真的不知道这是否正常,他们只是在等待他们转向参加传入连接,如果是这样,那么问题是在不同的地方,但我想丢弃码头部分。

顺便说一句,码头版本是7.5.4

有什么想法吗?

由于

0 个答案:

没有答案