Jetty Service Crashes Threads and Uses 100% Processor

I have a strange problem with Jetty. After a while, servicing requests, CPU usage goes 100%. I found the thread responsible, and here are a few examples of its stack trace made 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 routes were made without connecting clients, i.e. it was enough to restart the affected thread and pause it again to trace the stack. Does anyone have any ideas?

Edit: this is related, interesting: How to get a Jetty stream dump?

+1
source share
1 answer

How long does it take before it does?

Do you start the JVM with the -server switch? I would recommend doing this if you did not.

To me, this sounds like a Jetty bug. Perhaps try to find their archives.

0
source

All Articles