Skip to content
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

Netty Connector does not reuse and leaks connections #4286

Closed
olotenko opened this issue Oct 10, 2019 · 1 comment
Closed

Netty Connector does not reuse and leaks connections #4286

olotenko opened this issue Oct 10, 2019 · 1 comment
Assignees

Comments

@olotenko
Copy link

https://github.com/eclipse-ee4j/jersey/blob/8dcbaf4/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java#L192 - for every new request a new connection is established. This is suboptimal, since generally one would want to reuse a JAX-RS Client, and benefit from keep-alive.

Also, there appears to be no code to close unused connections.

@olotenko
Copy link
Author

netty_conn_reuse.zip
POC reusing connections. It is really a proof of concept demonstrating socket reuse, does not take care of unused connections, does not limit the connection pool size.

@senivam senivam self-assigned this Oct 22, 2019
010gvr added a commit to 010gvr/jersey that referenced this issue Nov 6, 2019
This commit contains a rewritten implementation of Netty Jersey server and client with the following major changes:
1) Consume `ByteBuf`s from `HttpContent` as-is for processing.
2) Fixes major leak and timout issues reported in eclipse-ee4j#3500 , eclipse-ee4j#3568 and eclipse-ee4j#4286
3) Fixes a bug on reading 0-byte or 1-byte JSON content

Signed-off-by: Venkat Ganesh 010gvr@gmail.com
010gvr added a commit to 010gvr/jersey that referenced this issue Nov 6, 2019
This commit contains a rewritten implementation of Netty Jersey server and client with the following major changes:
1) Consume `ByteBuf`s from `HttpContent` as-is for processing, reduces a lot of overhead.
2) Fixes a bug on reading 0-byte or 1-byte JSON content
3) Add three new configurable `ChunkedInput` buffer properties through `jersey.ci.capacity`, `jersey.ci.read.timeout` and `jersey.ci.write.timeout`
4) Add configurable payload size through `jersey.max.http.request.entitySizeMb` , defaults to 50 Mb

This change should fix some of the long pending bug reports in eclipse-ee4j#3500 , eclipse-ee4j#3568 and eclipse-ee4j#4286 . This may also resolve eclipse-ee4j#4285

Signed-off-by: Venkat Ganesh 010gvr@gmail.com
010gvr added a commit to 010gvr/jersey that referenced this issue Nov 6, 2019
This commit contains a rewritten implementation of Netty Jersey server and client with the following major changes:
1) Consume `ByteBuf`s from `HttpContent` as-is for processing, reduces a lot of overhead.
2) Fixes a bug on reading 0-byte or 1-byte JSON content
3) Add three new configurable `ChunkedInput` buffer properties through `jersey.ci.capacity`, `jersey.ci.read.timeout` and `jersey.ci.write.timeout`
4) Add configurable payload size through `jersey.max.http.request.entitySizeMb` , defaults to 50 Mb

This change should fix some of the long pending bug reports in eclipse-ee4j#3500 , eclipse-ee4j#3568 and eclipse-ee4j#4286 . This may also resolve eclipse-ee4j#4285

Signed-off-by: Venkat Ganesh 010gvr@gmail.com
010gvr added a commit to 010gvr/jersey that referenced this issue Nov 6, 2019
This commit contains a rewritten implementation of Netty Jersey server and client with the following major changes:
1) Consume `ByteBuf`s from `HttpContent` as-is for processing, reduces a lot of overhead.
2) Fixes a bug on reading 0-byte or 1-byte JSON content
3) Add three new configurable `ChunkedInput` buffer properties through `jersey.ci.capacity`, `jersey.ci.read.timeout` and `jersey.ci.write.timeout`
4) Add configurable payload size through `jersey.max.http.request.entitySizeMb` , defaults to 50 Mb

This change should fix some of the long pending bug reports in eclipse-ee4j#3500 , eclipse-ee4j#3568 and eclipse-ee4j#4286 . This may also resolve eclipse-ee4j#4285

Signed-off-by: Venkat Ganesh 010gvr@gmail.com
010gvr added a commit to 010gvr/jersey that referenced this issue Nov 6, 2019
This commit contains a rewritten implementation of Netty Jersey server and client with the following major changes:
1) Consume `ByteBuf`s from `HttpContent` as-is for processing, reduces a lot of overhead.
2) Fixes a bug on reading 0-byte or 1-byte JSON content
3) Add three new configurable `ChunkedInput` buffer properties through `jersey.ci.capacity`, `jersey.ci.read.timeout` and `jersey.ci.write.timeout`
4) Add configurable payload size through `jersey.max.http.request.entitySizeMb` , defaults to 50 Mb

This change should fix some of the long pending bug reports in eclipse-ee4j#3500 , eclipse-ee4j#3568 and eclipse-ee4j#4286 . This may also resolve eclipse-ee4j#4285

Signed-off-by: Venkat Ganesh 010gvr@gmail.com
@jansupol jansupol closed this as completed Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants