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

C10K Problem #62

Open
nao16t opened this issue Mar 23, 2014 · 2 comments
Open

C10K Problem #62

nao16t opened this issue Mar 23, 2014 · 2 comments

Comments

@nao16t
Copy link

nao16t commented Mar 23, 2014

Hello,

I wrote a Yesod application with this WebSocket Library.
This WebSocket Library works great, thanks.

However, I have C10K problem in terms of WebSocket connection.
My server terminates due to "failed to create OS thread"
when the number of clients exceeded about 1000 in my environment:
Windows 7 32bit,
Haskell Platform 2013.2.0.0 Windows 32bit binary.

I confirmed that the example, server.lhs, reproduced the same symptom too.
The server increases one OS Thread per client.

Is this a known problem?

Best regards,
nao16t

@jaspervdj
Copy link
Owner

It's a problem I didn't know about. I tested it using the built-in server (not Yesod) on Linux and it smoothly goes over a thousand connections when running this script: https://github.com/jaspervdj/websockets/blob/master/benchmarks/echo.js

I'll try it using the Yesod backend later. Unfortunately I don't have a Windows machine to test this though.

@nao16t
Copy link
Author

nao16t commented Mar 25, 2014

jaspervdj-san,

Thank you for investigating quickly.
I tried echo.hs you checked in yesterday on Linux using VMWare Player too.
Ubuntu 13.10 64bit
Haskell Platform 2013.2.0.0 64bit binary

I confirmed that 10K connections worked Okay and the number of OS
threads stayed 3.

So this problem happens only on Windows.

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