TR: Too many opened files.
本帖最后由 lislee2001 于 2013-3-13 21:26 编辑Tranmission 一直出现:Too many opened files.
系统的连接数已经破解
xxx@xxx:~$ ulimit -n
65535
Transmission 2.77的max peer 也已经改成8192了.
有人知道为啥吗??
------------------------------------------------------
没人知道啊,下了TR的源代码,发现有一行
.......
/* set the open-file limit to the largest safe size wrt FD_SETSIZE */
if (!getrlimit (RLIMIT_NOFILE, &limit))
{
const int old_limit = (int) limit.rlim_cur;
const int new_limit = MIN (limit.rlim_max, FD_SETSIZE);
if (new_limit != old_limit)
{
limit.rlim_cur = new_limit;
setrlimit (RLIMIT_NOFILE, &limit);
getrlimit (RLIMIT_NOFILE, &limit);
tr_inf ("Changed open file limit from %d to %d", old_limit, (int)limit.rlim_cur);
}
...............
没用过tr.... 楼下怎么看 挂少点种就可以了。
页:
[1]