[hobbit] all purple?
Emmanuel Dreyfus
manu at netbsd.org
Thu Jan 27 00:11:32 CET 2005
Henrik Stoerner <henrik at hswn.dk> wrote:
> server/bin/bbcmd --env=server/etc/hobbitserver.cfg \
> bbtest-net --report --ping --checkresponse --debug
2005-01-27 00:02:20 Cannot get socket - EMFILE
2005-01-27 00:02:20 Try running with a lower --concurrency setting
(currently: 64)
2005-01-27 00:02:20 Cannot get socket - EMFILE
2005-01-27 00:02:20 Try running with a lower --concurrency setting
(currently: 64)
2005-01-27 00:02:20 select - no active fd's found, but pending is 2
2005-01-27 00:02:20 select - no active fd's found, but pending is 2
2005-01-27 00:02:20 select - no active fd's found, but pending is 2
And it loops forever on this.
We hit the file descriptor limit. The default is 64 (check it with
ulimit), which is not enough for bbtest-net. Running ulimit -n 256
before your test fixes the problem.
That can be fixed by running ulimit -n in the startup script, but we
have no idea of the required amount of file descriptors at that time,
we'll have to raise the limit high as possible and hope it will be okay.
The other fix is to raise the limit in the C program that consumes a lot
of file descriptors. If you need fdmax descriptors:
/* Bump the file descriptor limit to fdmax */
struct rlimit limit;
if (getrlimit(RLIMIT_NOFILE, &limit) != 0)
err(1, "getrlimit failed");
if (limit.rlim_max < fdmax)
errx(1, "File descriptor hard limit hit");
limit.rlim_cur = fdmax;
if (getrlimit(RLIMIT_NOFILE, &limit) != 0)
err(1, "setrlimit failed");
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu at netbsd.org
More information about the Xymon
mailing list