Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Not A Bug
-
Affects Version/s: 7.3.1
-
Fix Version/s: None
-
Component/s: NIO
-
Labels:None
-
Environment:Jetty 7.3.1
JDK 1.6.0.03 b05
Windows 2008 server standard
java -DSTOP.PORT=8765 -DSTOP.KEY=12dpulcnb320w -Xmx1024M -Xms1024M -Xmn512M -XX:-UseSplitVerifier -XX:+UseParallelOldGC -XX:-UseAdaptiveSizePolicy -XX:+UseNUMA -jar start.jar
-
Number of attachments :
Description
2012-08-07 11:53:32.502:WARN::handle failed
java.lang.OutOfMemoryError at sun.misc.Unsafe.allocateMemory(Native Method)
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:99)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
at sun.nio.ch.IOUtil.write(IOUtil.java:134)
at sun.nio.ch.SocketChannelImpl.write0(SocketChannelImpl.java:365)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:388)
at java.nio.channels.SocketChannel.write(SocketChannel.java:360)
at org.eclipse.jetty.io.nio.ChannelEndPoint.gatheringFlush(ChannelEndPoint.java:295)
at org.eclipse.jetty.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:233)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:273)
at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:843)
at org.eclipse.jetty.http.HttpGenerator.complete(HttpGenerator.java:809)
at org.eclipse.jetty.server.HttpConnection.completeResponse(HttpConnection.java:737)
at org.eclipse.jetty.server.Response.complete(Response.java:1144)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:659)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1057)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:807)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:526)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:41)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:528)
at java.lang.Thread.run(Thread.java:619)
Issue Links
- is duplicated by
-
JETTY-1536
Cometd connect out of memory error
-
running out of memory mostly not a bug, unless there is a leak somewhere. More importantly, the code that runs out of memory is often not the cause of the leak.
In this case, it may have been the application or some other code that has consumed all the free memory and the ChannelEndPoint is just the straw that broke the camels back and not the cause of the memory consumption.
So firstly you need to evaluate how much memory your application needs in Idle and per connection - then determine if you have allocated enough memory for the load offered.
Secondly you need to look for any memory leaks. Does memory consumption return to previous levels after load is removed.
If you see memory problems, you need to profile them. Only if you see evidence of Jetty using excessive memory or not releasing memory should it be considered a Jetty bug.
If you need help analysing your application for such memory issues, please contact http://www.webtide.com as we offer application tuning as a service.