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

Server socket timeout control #73

Open
potatopankakes opened this issue Feb 15, 2018 · 1 comment
Open

Server socket timeout control #73

potatopankakes opened this issue Feb 15, 2018 · 1 comment

Comments

@potatopankakes
Copy link

I am running into issues w/the jersey server sockets not closing out. The file handles seem to be accumulating and not closing out. I see the accumulation when I run lsof. All of my REST methods are async, and so take @Suspended final AsyncResponse asyncResponse, and I believe all code paths call asyncResponse.resume()... which is backed up by clients always getting their response. Despite that, the Jersey server's sockets don't seem to close out w/in the OS, but I see little if no memory leaks/accumulation. Would configuration of socket timeouts be configured in Jersey, Vert.x, or maybe Netty?

@adrianluisgonzalez
Copy link
Member

I would guess socket timeouts would be configured via vert.x (which then passes configuration on to netty).

If you are calling asyncResponse.resume() that should end the response and close the connection for you. You could check to see if there is any functional difference between calling ServerWebSocket#close and HttpServerResponse#end.

It might be worth stepping through the code to confirm the web socket is in fact closing as expected.
https://github.com/ef-labs/vertx-jersey/blob/develop/vertx-jersey/src/main/java/com/englishtown/vertx/jersey/impl/VertxResponseWriter.java#L348

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

2 participants