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

Lingering close doesn't terminate before timeout #1559

Closed
heftig opened this issue Jan 26, 2017 · 3 comments
Closed

Lingering close doesn't terminate before timeout #1559

heftig opened this issue Jan 26, 2017 · 3 comments
Labels

Comments

@heftig
Copy link

heftig commented Jan 26, 2017

Long story short

My web app is occasionally freezing for 30s, burning CPU all the while.

Steps to reproduce

Not clear. There's a lot of code involved.

The problem disappears when:

  • I set lingering_time=0
  • I change line 277 in aiohttp/server.py from
while self._loop.time() < end_time:

to

while not payload.is_eof() and self._loop.time() < end_time:
  • I use loop.set_debug(True) to enable async debugging. There are no more uncompleted requests, either. Maybe the protocol gets slowed down enough to receive the EOF early.

Your environment

aiohttp 1.2.0, python 3.6, Linux

@fafhrd91
Copy link
Member

good catch! thanks!

@fafhrd91
Copy link
Member

fixed in master 4a59c4f

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants