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

Unlimited threads in facil.io - 0.7.x HTTP / WebSockets Server #150

Open
zkwasm opened this issue Sep 6, 2023 · 1 comment
Open

Unlimited threads in facil.io - 0.7.x HTTP / WebSockets Server #150

zkwasm opened this issue Sep 6, 2023 · 1 comment

Comments

@zkwasm
Copy link

zkwasm commented Sep 6, 2023

Hi All,

I have following the guide to create a HTTP server:
https://facil.io/0.7.x/index

Then, I do a stress test on the created HTTP server. There are 5000 successful HTTP request/response on the server, it is OK, but when I check the status of the server, I found the server forked 5000 threads and these threads never terminate.

There is an option "max_clients", I set max_clients = 100 and test again, the server still forked 5000 threads and these threads never terminate.

Is something wrong? or I miss some important information...

Sincerely,
Tom.

@boazsegev
Copy link
Owner

The server doesn't usually fork any threads. In the example the server uses 1 thread and it should be able to serve tens of thousands of concurrent clients.

Am I missing something? Are you spawning your own threads?

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