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

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

Open
mdys opened this issue Nov 28, 2024 · 0 comments

Comments

@mdys
Copy link

mdys commented Nov 28, 2024

$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))

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

1 participant