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

log a warning when sending requests with a large body of bytes #2127

Merged
merged 1 commit into from
Jul 24, 2017

Conversation

arthurdarcet
Copy link
Contributor

As discussed in #2126 , log a warning when sending a request with a large body payload passed as bytes directly: aiohttp does not do any chunking for this use case, and it can freeze the event loop.

@@ -150,6 +151,11 @@ def __init__(self, value, *args, **kwargs):

self._size = len(value)

if self._size > DEFAULT_LIMIT:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think DEFAULT_LIMIT is too small. lets define new const, something close to 1mb

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, do you want it in payload.py or in stream.py next to the other constants?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be payload specific

@fafhrd91 fafhrd91 merged commit 94de7f0 into aio-libs:master Jul 24, 2017
@fafhrd91
Copy link
Member

thanks

fafhrd91 added a commit that referenced this pull request Jul 24, 2017
@lock
Copy link

lock bot commented Oct 28, 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 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants