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

aiohttp.client_exceptions.ClientResponseError: 429, message='Too Many Requests' #3

Open
enterdv opened this issue Jan 24, 2023 · 1 comment

Comments

@enterdv
Copy link

enterdv commented Jan 24, 2023

Hi and thank you for sharing such useful tool!

I have an error in a cluster with a lot of namespaces (2000+)

aiohttp.client_exceptions.ClientResponseError: 429, message='Too Many Requests', url=URL('https://10.234.0.1:443/api/v1/namespaces/web-4601')
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator The above exception was the direct cause of the following exception:
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator Traceback (most recent call last):
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator   File "/usr/local/lib/python3.10/site-packages/kopf/_core/actions/throttlers.py", line 44, in throttled
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator     yield should_run
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator   File "/usr/local/lib/python3.10/site-packages/kopf/_core/reactor/processing.py", line 130, in process_resource_event
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator     applied = await application.apply(
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator   File "/usr/local/lib/python3.10/site-packages/kopf/_core/actions/application.py", line 60, in apply
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator     await patch_and_check(
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator   File "/usr/local/lib/python3.10/site-packages/kopf/_core/actions/application.py", line 131, in patch_and_check
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator     resulting_body = await patching.patch_obj(
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator   File "/usr/local/lib/python3.10/site-packages/kopf/_cogs/clients/patching.py", line 47, in patch_obj
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator     patched_body = await api.patch(
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator   File "/usr/local/lib/python3.10/site-packages/kopf/_cogs/clients/api.py", line 155, in patch
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator     response = await request(
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator   File "/usr/local/lib/python3.10/site-packages/kopf/_cogs/clients/auth.py", line 45, in wrapper
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator     return await fn(*args, **kwargs, context=context)
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator   File "/usr/local/lib/python3.10/site-packages/kopf/_cogs/clients/api.py", line 85, in request
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator     await errors.check_response(response)  # but do not parse it!
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator   File "/usr/local/lib/python3.10/site-packages/kopf/_cogs/clients/errors.py", line 150, in check_response
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator     raise cls(payload, status=response.status) from e
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator kopf._cogs.clients.errors.APIClientError: (None, None)
remove-empty-ns-operator-56fcb5cf99-djbnj remove-empty-ns-operator [2023-01-24 08:10:29,593] kopf.objects         [ERROR   ] [wl-frontend-web-4647] Throttling for 1 seconds due to an unexpected error: APIClientError(None, None)
@rgeraskin
Copy link
Owner

Hi! Thanks for your report. I'll check it out.

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