danog / MadelineProto

Async PHP client API for the telegram MTProto protocol
https://docs.madelineproto.xyz
GNU Affero General Public License v3.0
2.76k stars 619 forks source link

processor 100% when startAndLoop #1411

Closed morozovsk closed 10 months ago

morozovsk commented 10 months ago

I have a code:

$instance = new \danog\MadelineProto\API("runtime/madeline/$bot_config.madeline", ['app_info' => ['api_id' => '', 'api_hash' => '', 'logger' => ['level' => 2]]);
$instance->startAndLoop(TgEventHandler::class);

and I have 100% processor loading. also I have log level 2 (warning) but I have a lot of notices like: MsgIdHandler, 5427305996: Zend hashmap reallocation done. Cleaned memory: 0.2 Mb

danog commented 10 months ago

Switch to MadelineProto 8 and to TgEventHandler::startAndLoop to fix.