jfinal-undertow下部署一段时间之后自动关闭,异常如下

[2019-10-31 10:34:37][ERROR][io.undertow.request.io] UT005090: Unexpected failur

e

java.util.concurrent.RejectedExecutionException: XNIO007007: Thread is terminati

ng

        at org.xnio.nio.WorkerThread.execute(WorkerThread.java:590)

        at org.xnio.channels.EmptyStreamSourceChannel.shutdownReads(EmptyStreamS

ourceChannel.java:184)

        at io.undertow.servlet.spec.ServletInputStreamImpl.close(ServletInputStr

eamImpl.java:269)

        at io.undertow.servlet.spec.HttpServletRequestImpl.closeAndDrainRequest(

HttpServletRequestImpl.java:682)

        at io.undertow.servlet.core.ServletBlockingHttpExchange.close(ServletBlo

ckingHttpExchange.java:89)

        at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.

java:1624)

        at io.undertow.server.AbstractServerConnection$CloseSetter.handleEvent(A

bstractServerConnection.java:316)

        at io.undertow.server.AbstractServerConnection$CloseSetter.handleEvent(A

bstractServerConnection.java:296)

        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java

:92)

        at org.xnio.StreamConnection.invokeCloseListener(StreamConnection.java:8

0)

        at org.xnio.Connection.close(Connection.java:142)

        at io.undertow.server.AbstractServerConnection.close(AbstractServerConne

ction.java:159)

        at org.xnio.IoUtils.safeClose(IoUtils.java:134)

        at io.undertow.server.protocol.http.HttpResponseConduit.write(HttpRespon

seConduit.java:616)

        at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.write(Abstr

actFixedLengthStreamSinkConduit.java:106)

        at org.xnio.conduits.Conduits.writeFinalBasic(Conduits.java:132)

        at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.writeFinal(

AbstractFixedLengthStreamSinkConduit.java:175)

        at org.xnio.conduits.ConduitStreamSinkChannel.writeFinal(ConduitStreamSi

nkChannel.java:104)

        at io.undertow.channels.DetachableStreamSinkChannel.writeFinal(Detachabl

eStreamSinkChannel.java:195)

        at io.undertow.server.HttpServerExchange$WriteDispatchChannel.writeFinal

(HttpServerExchange.java:2082)

        at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(

ServletOutputStreamImpl.java:572)

        at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputS

treamImpl.java:609)

        at io.undertow.servlet.spec.ServletPrintWriter.close(ServletPrintWriter.

java:117)

        at io.undertow.servlet.spec.ServletPrintWriterDelegate.close(ServletPrin

tWriterDelegate.java:81)

        at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter

(HttpServletResponseImpl.java:480)

        at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpSer

vletResponseImpl.java:575)

        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest

(ServletInitialHandler.java:351)

        at io.undertow.servlet.handlers.ServletInitialHandler.access$100(Servlet

InitialHandler.java:81)

        at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInit

ialHandler.java:138)

        at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInit

ialHandler.java:135)

        at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.cal

l(ServletRequestContextThreadSetupAction.java:48)

        at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(Context

ClassLoaderSetupAction.java:43)

        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(Se

rvletInitialHandler.java:272)

        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(Servlet

InitialHandler.java:81)

        at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(Se

rvletInitialHandler.java:104)

        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)


        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:8

30)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

        at java.lang.Thread.run(Unknown Source)



评论区

JFinal

2019-10-31 12:56

使用 JDK 自带的 visual VM 观测一下你的项目的资源回收情况,这种事情一般是项目代码的资源泄漏造成的

此外,你的异常信息与 JVM 挂掉没有必然关系,JVM 挂掉会有一个 crash 异常

热门反馈

扫码入社