首页
下载
文档
问答社区
视频
捐赠
源代码
AI 助理
赞助商
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
商业产品
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
websocket 丢失数据以及报错
``` # js for (var i = 0; i <= 10000; i++) { var chat = { api: "chat", data: { content: "test" + i } }; ws.send( JSON.stringify(chat) ); } ``` ``` # php 答应数据发现data为空 object(Swoole\WebSocket\Frame)#50 (4) { ["fd"]=> int(1) ["finish"]=> bool(true) ["opcode"]=> int(0) ["data"]=> NULL } ``` ``` # 最后伴随错误 [2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed. [2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed. [2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed. [2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed. [2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed. [2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed. ``` ``` # 配置 $server -> set([ 'worker_num' => 10, 'task_worker_num' => 10, ]); # 期间有task执行 $task_id = $server->task(['task'=> self::GET_MESSAGE, 'data' => $frame -> data]); ```
发布于7年前 · 1 次浏览 · 来自
提问
N
N
``` # js for (var i = 0; i <= 10000; i++) { var chat = { api: "chat", data: { content: "test" + i } }; ws.send( JSON.stringify(chat) ); } ``` ``` # php 答应数据发现data为空 object(Swoole\WebSocket\Frame)#50 (4) { ["fd"]=> int(1) ["finish"]=> bool(true) ["opcode"]=> int(0) ["data"]=> NULL } ``` ``` # 最后伴随错误 [2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed. [2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed. [2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed. [2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed. [2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed. [2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed. ``` ``` # 配置 $server -> set([ 'worker_num' => 10, 'task_worker_num' => 10, ]); # 期间有task执行 $task_id = $server->task(['task'=> self::GET_MESSAGE, 'data' => $frame -> data]); ```
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2017-07-21
环境是`php-7.0.4`和`swoole-1.8.2`
赞
0
回复
2017-07-21
c
conquer
添加`buffer_output_size`配置后解决了异常`[2016-03-23 11:02:41 ^2880.19] ERROR swFactoryProcess_finish (ERROR 1006): send failed, session#1 output buffer has been overflowed.`。 但是有的请求数据还是为空,比例为 15000 次 请求 7次 请求 无数据。 ``` object(Swoole\WebSocket\Frame)#50 (4) { [&q
赞
0
回复
微信公众号
热门内容
暂无回复的问答
- CodeGalaxy K3s 轻量集群节点之间如何实现负载均衡
- 关于openssl CURL WARNING swSSL_connect: SSL_connect(fd=69) failed. Error: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small[1|394]
- 多个模型如何进行事务异常回退?
- websocket开启wss报错
- 协程tcp服务器如何使用多进程?recv()方法接收信息,打印出来的pid一直是同一个。没用使用到多进程啊。