错误Too many open file
dingyaoyang opened this issue · comments
dingyaoyang commented
我用5000线程请求TLVServer返回错误Too many open file,但用4000线程似乎没有问题
猜测可能是这个参数 fio_max_events限制为4096导致的,但修改为1000000后仍然会返回错误,应该改哪里呢?
struct WFGlobalSettings settings = GLOBAL_SETTINGS_DEFAULT;
settings.endpoint_params.max_connections = 1000000;
settings.fio_max_events = 1000000;
WORKFLOW_library_init(&settings);
xiehan commented
不是,这个是因为你没有修改server最大连接数,默认是2000。在struct WFServerParams里有个max_connections参数。
dingyaoyang commented
struct WFServerParams params = SERVER_PARAMS_DEFAULT;
params.max_connections = 1000000;// 测试
WFTLVServer server(¶ms, process);
修改过了,客户端仍然返回错误
xiehan commented
client对单个目标最大连接数是200……
{
struct WFGlobalSettings settings = GLOBAL_SETTINGS_DEFAULT;
settings.endpoint_params.max_connections = 5000;
WORKFLOW_library_init(&settings);
...
}
xiehan commented
client对单个目标最大连接数是200……
{ struct WFGlobalSettings settings = GLOBAL_SETTINGS_DEFAULT; settings.endpoint_params.max_connections = 5000; WORKFLOW_library_init(&settings); ... }
这个是改在client端的哦。
dingyaoyang commented
第一段描述中已经改过了,这个参数是超过200线程时返回的是资源暂时不可用
xiehan commented
不过,这种情况我们的错误码是EAGAIN。是不是你自己系统配置的问题?ulimit看一下。
dingyaoyang commented
unlimited.
在客户端中,我用WFGlobal::get_error_string(state, error);
获取的错误,
然后找到了这个(#1350 (comment)) 修改的,改完确实不会出现Resource temporarily unavailable
xiehan commented
是ulimit -n,看一下进程打开文件最大数是多少。这个too many open file这个错误不像是我们填的,很可能是我们新建socket失败了。
…---原始邮件---
发件人: ***@***.***>
发送时间: 2024年3月5日(周二) 中午11:47
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [sogou/workflow] 错误Too many open file (Issue #1501)
unlimited.
在客户端中,我用WFGlobal::get_error_string(state, error);获取的错误,
然后找到了这个(#1350 (comment)) 修改的,改完确实不会出现Resource temporarily unavailable
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
dingyaoyang commented
解决了