-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP form-data OutOfDirectMemoryError #10424
Comments
@wuxiansen Fix by #10360 |
👌 |
normanmaurer
pushed a commit
that referenced
this issue
Aug 13, 2020
… is full (#10457) Motivation: When we were using the netty http protocol, OOM occurred, this problem has been in 4.1.51.Final Fix [# 10424](#10424), even if OOM is up, the service will still receive new connection events, will occur again OOM and eventually cause the connection not to be released. code `byteBuf = allocHandle.allocate(allocator);` Modification: I fail to create buffer when I try to receive new data, i determine if it is OOM then the close read event releases the connection. ```java if (close || cause instanceof OutOfMemoryError || cause instanceof IOException) { closeOnRead(pipeline); } ``` Result: Fixes # [10434](#10434).
normanmaurer
pushed a commit
that referenced
this issue
Aug 13, 2020
… is full (#10457) Motivation: When we were using the netty http protocol, OOM occurred, this problem has been in 4.1.51.Final Fix [# 10424](#10424), even if OOM is up, the service will still receive new connection events, will occur again OOM and eventually cause the connection not to be released. code `byteBuf = allocHandle.allocate(allocator);` Modification: I fail to create buffer when I try to receive new data, i determine if it is OOM then the close read event releases the connection. ```java if (close || cause instanceof OutOfMemoryError || cause instanceof IOException) { closeOnRead(pipeline); } ``` Result: Fixes # [10434](#10434).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
release buffer
Actual behavior
no release
Steps to reproduce
Netty Main
HttpServerChannelInitializer.java
HttpRequestHandler.java
Request.java
Minimal yet complete reproducer code (or URL to code)
AbstractDiskHttpData.java
ByteBuffer byteBuffer = buffer.nioBufferCount() == 1 ? buffer.nioBuffer() : buffer.copy().nioBuffer();
this byteBuffer no release, should byteBuffer.release() Or don't copy buffer
Netty version
4.1.50.Final
JVM version (e.g.
java -version
)java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
OS version (e.g.
uname -a
)Windows
Linux
The text was updated successfully, but these errors were encountered: