Jetty service Thread crashes and uses 100% CPU

五迷三道 提交于 2019-12-11 09:51:26

问题


I have a strange problem with Jetty. After a while, serving requests, the CPU usage goes to 100%. I have found the thread responsible, and here are a few samples of its stack trace taken in eclipse:

SocketInputStream.read(byte[], int, int) line: 113  
ByteArrayBuffer.readFrom(InputStream, int) line: 388    
SocketConnector$ConnectorEndPoint(StreamEndPoint).fill(Buffer) line: 132    
SocketConnector$ConnectorEndPoint.fill(Buffer) line: 209    
HttpParser.parseNext() line: 289    
HttpParser.parseAvailable() line: 214   
HttpConnection.handle() line: 411   
SocketConnector$ConnectorEndPoint.run() line: 241   
QueuedThreadPool$3.run() line: 529  
Thread.run() line: 680

Throwable.fillInStackTrace() line: not available [native method]    
SocketException(Throwable).<init>(String) line: 196 
SocketException(Exception).<init>(String) line: 41  
SocketException(IOException).<init>(String) line: 41    
SocketException.<init>(String) line: 29 
SocketInputStream.read(byte[], int, int) line: 113  
ByteArrayBuffer.readFrom(InputStream, int) line: 388    
SocketConnector$ConnectorEndPoint(StreamEndPoint).fill(Buffer) line: 132    
SocketConnector$ConnectorEndPoint.fill(Buffer) line: 209    
HttpParser.parseNext() line: 289    
HttpParser.parseAvailable() line: 214   
HttpConnection.handle() line: 411   
SocketConnector$ConnectorEndPoint.run() line: 241   
QueuedThreadPool$3.run() line: 529  
Thread.run() line: 680  

ByteArrayBuffer.readFrom(InputStream, int) line: 388    
SocketConnector$ConnectorEndPoint(StreamEndPoint).fill(Buffer) line: 132    
SocketConnector$ConnectorEndPoint.fill(Buffer) line: 209    
HttpParser.parseNext() line: 289    
HttpParser.parseAvailable() line: 214   
HttpConnection.handle() line: 411   
SocketConnector$ConnectorEndPoint.run() line: 241   
QueuedThreadPool$3.run() line: 529  
Thread.run() line: 680  

SocketConnector$ConnectorEndPoint.fill(Buffer) line: 209    
HttpParser.parseNext() line: 289    
HttpParser.parseAvailable() line: 214   
HttpConnection.handle() line: 411   
SocketConnector$ConnectorEndPoint.run() line: 241   
QueuedThreadPool$3.run() line: 529  
Thread.run() line: 680  

These traces were taken with no clients connected, that is, it was sufficient to re-start the affected Thread and suspend it again to take the stack trace. Anyone have any ideas?

Edit: Is this related, I wonder: How to get Jetty thread dump?


回答1:


How long does it run before it does this?

Are you starting the JVM with the -server switch? I would recommend doing so if you're not.

To me this sounds like a Jetty bug. Can maybe try searching their archives.



来源:https://stackoverflow.com/questions/7404844/jetty-service-thread-crashes-and-uses-100-cpu

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!