Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Flood Waits due to heavy requests #83

Closed
ni5arga opened this issue Aug 12, 2021 · 2 comments
Closed

Flood Waits due to heavy requests #83

ni5arga opened this issue Aug 12, 2021 · 2 comments

Comments

@ni5arga
Copy link

ni5arga commented Aug 12, 2021

pyrogram.errors.exceptions.flood_420.FloodWait: [420 FLOOD_WAIT_X]: A wait of 26 seconds is required (caused by "messages.GetFullChat")
ERROR:pyrogram.dispatcher:[420 FLOOD_WAIT_X]: A wait of 14 seconds is required (caused by "messages.GetFullChat")
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pyrogram/dispatcher.py", line 217, in handler_worker
    await handler.callback(self.client, *args)
  File "/app/DaisyXMusic/modules/play.py", line 465, in play
    administrators = await get_administrators(message.chat)
  File "/app/DaisyXMusic/helpers/admins.py", line 32, in get_administrators
    administrators = await chat.get_members(filter="administrators")
  File "/usr/local/lib/python3.9/site-packages/pyrogram/types/user_and_chats/chat.py", line 862, in get_members
    return await self._client.get_chat_members(
  File "/usr/local/lib/python3.9/site-packages/pyrogram/methods/chats/get_chat_members.py", line 109, in get_chat_members
    r = await self.send(
  File "/usr/local/lib/python3.9/site-packages/pyrogram/methods/advanced/send.py", line 77, in send
    r = await self.session.send(
  File "/usr/local/lib/python3.9/site-packages/pyrogram/session/session.py", line 425, in send
    return await self._send(data, timeout=timeout)
  File "/usr/local/lib/python3.9/site-packages/pyrogram/session/session.py", line 395, in _send
    RPCError.raise_it(result, type(data))
  File "/usr/local/lib/python3.9/site-packages/pyrogram/errors/rpc_error.py", line 78, in raise_it
    raise getattr(
pyrogram.errors.exceptions.flood_420.FloodWait: [420 FLOOD_WAIT_X]: A wait of 14 seconds is required (caused by "messages.GetFullChat")

How to fix this

@InukaAsith InukaAsith changed the title Flood Wait Flood Waits due to heavy requests Aug 12, 2021
@InukaAsith
Copy link
Collaborator

pyrogram.errors.exceptions.flood_420.FloodWait: [420 FLOOD_WAIT_X]: A wait of 26 seconds is required (caused by "messages.GetFullChat")
ERROR:pyrogram.dispatcher:[420 FLOOD_WAIT_X]: A wait of 14 seconds is required (caused by "messages.GetFullChat")
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pyrogram/dispatcher.py", line 217, in handler_worker
    await handler.callback(self.client, *args)
  File "/app/DaisyXMusic/modules/play.py", line 465, in play
    administrators = await get_administrators(message.chat)
  File "/app/DaisyXMusic/helpers/admins.py", line 32, in get_administrators
    administrators = await chat.get_members(filter="administrators")
  File "/usr/local/lib/python3.9/site-packages/pyrogram/types/user_and_chats/chat.py", line 862, in get_members
    return await self._client.get_chat_members(
  File "/usr/local/lib/python3.9/site-packages/pyrogram/methods/chats/get_chat_members.py", line 109, in get_chat_members
    r = await self.send(
  File "/usr/local/lib/python3.9/site-packages/pyrogram/methods/advanced/send.py", line 77, in send
    r = await self.session.send(
  File "/usr/local/lib/python3.9/site-packages/pyrogram/session/session.py", line 425, in send
    return await self._send(data, timeout=timeout)
  File "/usr/local/lib/python3.9/site-packages/pyrogram/session/session.py", line 395, in _send
    RPCError.raise_it(result, type(data))
  File "/usr/local/lib/python3.9/site-packages/pyrogram/errors/rpc_error.py", line 78, in raise_it
    raise getattr(
pyrogram.errors.exceptions.flood_420.FloodWait: [420 FLOOD_WAIT_X]: A wait of 14 seconds is required (caused by "messages.GetFullChat")

How to fix this

Floodwaits happen due to heavy requests for userbot or bot

"remember that the API is designed to be used by official apps, by real people; anything above normal usage could be limited." - Pyrogram Docs

Exceptions are set already in places. There is no more places to fix

This happens due to

  • Too many userbot join requests
  • Too many admin updates
    (2nd one negligible)

And I hope it will get fixed automatically within few hours. and also userbot join floods also get reduced with time

@ni5arga
Copy link
Author

ni5arga commented Aug 13, 2021

Thanks for the help. Have a good day.

@ni5arga ni5arga closed this as completed Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants