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

client socket time out #1

Open
whutjs opened this issue Nov 20, 2015 · 3 comments
Open

client socket time out #1

whutjs opened this issue Nov 20, 2015 · 3 comments

Comments

@whutjs
Copy link

whutjs commented Nov 20, 2015

Hi, jjenkov, I really appreciate you blog because I've learned how to use Java NIO.And I have written a Http server based on your code.It works well when there are not much connections.But when I test it with high concurrent connection(10K connection), almost all the connections are time out(Socket time out). I just don't know how to optimize it now. Could you give me some advice? Thanks anyway!

@jjenkov
Copy link
Owner

jjenkov commented Nov 20, 2015

Hi,

I cannot help you with that just yet. I will need to look into all that
myself (with another protocol than HTTP) next month.
Maybe I can get back to you by then. I know it's a long time to wait, but
hey, at least I am getting to it.

Oh, and if you find a solution before then, please let me know!

  • Jakob Jenkov

On Fri, Nov 20, 2015 at 1:46 PM, whutjs [email protected] wrote:

Hi, jjenkov, I really appreciate you blog because I've learned how to use
Java NIO.And I have written a Http server based on your code.It works well
when there are not much connections.But when I test it with high concurrent
connection(10K connection), almost all the connections are time out(Socket
time out). I just don't know how to optimize it now. Could you give me some
advice? Thanks anyway!


Reply to this email directly or view it on GitHub
#1.

Jakob Jenkov
[email protected]
Founder, CEO

Jenkov Aps
http://jenkov.com
http://tutorials.jenkov.com

http://feeds2.feedburner.com/jenkov-com

@whutjs
Copy link
Author

whutjs commented Nov 20, 2015

    Alright.Thank you anyway:-)
        在2015年11月20日 20:52,Jakob Jenkov 写道:Hi,

I cannot help you with that just yet. I will need to look into all that
myself (with another protocol than HTTP) next month.
Maybe I can get back to you by then. I know it's a long time to wait, but
hey, at least I am getting to it.

Oh, and if you find a solution before then, please let me know!

  • Jakob Jenkov

On Fri, Nov 20, 2015 at 1:46 PM, whutjs [email protected] wrote:

Hi, jjenkov, I really appreciate you blog because I've learned how to use
Java NIO.And I have written a Http server based on your code.It works well
when there are not much connections.But when I test it with high concurrent
connection(10K connection), almost all the connections are time out(Socket
time out). I just don't know how to optimize it now. Could you give me some
advice? Thanks anyway!


Reply to this email directly or view it on GitHub
#1.

Jakob Jenkov
[email protected]
Founder, CEO

Jenkov Aps
http://jenkov.com
http://tutorials.jenkov.com

http://feeds2.feedburner.com/jenkov-com

—Reply to this email directly or view it on GitHub.

@zalavaari
Copy link

I'm still studying the sources, but I have a guess: When HttpMessageReader.read() calls Message.writeToMessage(), and there is no space for the new content, and no free block to expand, then the content of the ByteBuffer will be lost. (just a guess, didn't tried)

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