xtrime-ru / TelegramApiServer

Fast, simple, async php telegram api server: MadelineProto + Amp HTTP Server
https://tg.i-c-a.su
MIT License
575 stars 129 forks source link

FLOOD_WAIT error #103

Closed jaynlive closed 2 years ago

jaynlive commented 2 years ago
{
    "success": false,
    "errors": [
        {
            "exception": "danog\\MadelineProto\\RPCErrorException",
            "message": "FLOOD_WAIT_81227",
            "file": "/www/wwwroot/TelegramApiServer-master/vendor/danog/madelineproto/src/danog/MadelineProto/MTProtoSession/ResponseHandler.php",
            "line": 394,
            "code": 420,
            "backtrace": [
                {
                    "file": "/www/wwwroot/TelegramApiServer-master/vendor/danog/madelineproto/src/danog/MadelineProto/MTProtoSession/ResponseHandler.php",
                    "line": 194,
                    "function": "handleRpcError",
                    "class": "danog\\MadelineProto\\Connection",
                    "type": "->"
                },
                {
                    "file": "/www/wwwroot/TelegramApiServer-master/vendor/danog/madelineproto/src/danog/MadelineProto/MTProtoSession/ResponseHandler.php",
                    "line": 73,
                    "function": "handleResponse",
                    "class": "danog\\MadelineProto\\Connection",
                    "type": "->"
                },
                {
                    "file": "/www/wwwroot/TelegramApiServer-master/vendor/amphp/amp/lib/Loop/Driver.php",
                    "line": 119,
                    "function": "handleMessages",
                    "class": "danog\\MadelineProto\\Connection",
                    "type": "->"
                }
            ]
        }
    ],
    "response": null
}

why some time return FLOOD_WAIT? How can this situation be avoided as far as possible

xtrime-ru commented 2 years ago

Reduce number of such requests. You exceeded telegram rate limit.