Comments (8)
- 你先确定一下 "Too many open files" 是从 C 的哪一行抛出来的?
- 确定代码更新到最新。
from skynet.
自动重连捕获到网络错误时,建议sleep(1s) 再进行重连尝试
from skynet.
自动重连捕获到网络错误时,建议sleep(1s) 再进行重连尝试
不是重连问题,客户端代码我都屏蔽了只留了 websocket.connect,具体原因我还在查
目前定位到打印log的位置是:https://github.com/cloudwu/skynet/blob/master/skynet-src/socket_server.c#L1683
from skynet.
- 你先确定一下 "Too many open files" 是从 C 的哪一行抛出来的?
- 确定代码更新到最新。
问题找到了,把open files改成100, 启动100个机器人。 机器人请求httpc.request成功后连接websocket,大概在第77个httpc.request处出错,服务器会无限打印log。 单独测试没问题应该是httpc.request用完就释放了,所以没达到上限。
我在 https://github.com/cloudwu/skynet/blob/master/skynet-src/socket_server.c#L1578 下添加close(client_fd);
就正常了,但是不会打印 openfile limit的错误了。
在 https://github.com/cloudwu/skynet/blob/master/skynet-src/socket_server.c#L1584 下添加 close(client_fd);
还是会无限打印。
from skynet.
不好意思,没查明原因就提问,我下次会注意。
from skynet.
看看 emfile 分支上的 patch 能否解决这个问题。我暂时没有测试。
from skynet.
看看 emfile 分支上的 patch 能否解决这个问题。我暂时没有测试。
不会无限打印log了, 但是socket的openfiles没打印,文件打开上限skynet.require先报错了。
from skynet.
可以了,一切正常
from skynet.
Related Issues (20)
- 未知原因crash HOT 15
- socket_driver对fd的控制转移中会出现丢包现象 HOT 2
- 编译失败 HOT 1
- 22-8-26的最新版本skynet编译lua部分报错 HOT 1
- 热更新lua代码导致skynet工作线程死锁 HOT 4
- Makefile 首字母需要大写 HOT 4
- https支持开启后,socket:error on * Connection reset by peer HOT 2
- 服务 task 积压,内存暴涨,signal 后 task 依然不会消耗 HOT 11
- 偶尔出现https读取报错 HOT 3
- 借鉴simpleweb写的https功能,现在启动从服务后出现Socket Error。 HOT 1
- linux's special hostname format will cause cluster.open 'assert'
- c内存没有释放
- skynet出现CLOSE_WAIT HOT 1
- 想问下为什么最新的skynet在snax服务里require "snax"会报错呢
- 爱死云风了
- lua_resetthread 不兼容Official Lua HOT 7
- queue.lua的性能问题
- 服务创建失败了为啥还把queue添加到全局消息队列?
- cluster 数据没有指定大小端吗? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skynet.