Skip to content

使用websocket并发传输二进制会有 内存溢出的告警,php控制台也会卡住一下,求解~ #155

Description

@mdys

$serv->ws_clients[$fd]->push($pcm_data, WEBSOCKET_OPCODE_BINARY);
文件大小大约374kb,并发使用时候就会有这个告警
[Round#1836] leak 261.19 KB bytes, alloc 85 times at /home/wwwroot/html_88001/vendor/swlib/saber/src/WebSocket.php:59 #0 /home/wwwroot/html_88001/vendor/swlib/saber/src/WebSocket.php(59): Swoole\Coroutine\Http\Client->upgrade('...') #1 /home/wwwroot/html_88001/vendor/swlib/saber/src/Saber.php(313): Swlib\Saber\WebSocket->__construct(Object(Swlib\Http\Uri)) #2 /home/wwwroot/html_88001/vendor/swlib/saber/src/Saber.php(139): Swlib\Saber->upgrade() #3 /home/wwwroot/html_88001/vendor/swlib/saber/src/SaberGM.php(101): Swlib\Saber::websocket('...') #4 /home/wwwroot/html_88001/vos_server_o.php(1281): Swlib\SaberGM::websocket('...') #5 [internal function]: cdr->onOpen(Object(Swoole\WebSocket\Server), Object(Swoole\Http\Request))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions