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

Increase aiohttp read buffer to 2MiB #138

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion kubernetes_asyncio/client/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ def __init__(self, configuration, pools_size=4, maxsize=None):

# https pool manager
self.pool_manager = aiohttp.ClientSession(
connector=connector
connector=connector,
# Watch events containing large resource objects can exceed
# aiohttp's default read buffer size.
#
# There is no hard-limit defined by k8s, but the etcd default
# maximum request size is 1.5MiB.
# https://github.com/kubernetes/kubernetes/issues/19781
read_bufsize=2**21
)

async def close(self):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ python-dateutil>=2.5.3 # BSD
setuptools>=21.0.0 # PSF/ZPL
urllib3>=1.24.2 # MIT
pyyaml>=3.12 # MIT
aiohttp>=2.3.10,<4.0.0 # # Apache-2.0
aiohttp>=3.7.0,<4.0.0 # # Apache-2.0