Skip to content

Larger number of parallel connections fail #67

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

Open
ctschach opened this issue Jul 9, 2020 · 2 comments
Open

Larger number of parallel connections fail #67

ctschach opened this issue Jul 9, 2020 · 2 comments

Comments

@ctschach
Copy link

ctschach commented Jul 9, 2020

Hi,

I've created a little web app. When you load the page for the first time there are 8 file loaded:

index.html
2x css files
2x js files
3x images

The browser only succeeded on 4 connections. For the other remaining requests the connection is accepted but then instantly closed before the browser could even send his request. I checked this via tcpdump.

Is there a way to limit the number of parallel connections that picoweb accepts? Instead of accepting and instantly closing the connection it would be helpful to just wait until "connection slots" are free. BTW, you don't even see the failed connections in the debug log.

@pfalcon
Copy link
Owner

pfalcon commented Jul 10, 2020

@JK-de
Copy link

JK-de commented Jul 17, 2022

the uasyncio-function 'start_server' handles by default only 5 connections. You can change line 303 in picoweb/__init__.py to

loop.create_task(asyncio.start_server(self._handle, host, port, backlog=10))

ich you have enough memory to handle 8 connections at the same time

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