Project

General

Profile

Actions

Bug #2266

open

in.mpathd limited to 255 file descriptors

Added by Alasdair Lumsden about 10 years ago. Updated over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
cmd - userland programs
Start date:
2012-03-08
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

This limits the number of ipmp interfaces that can be created. ifconfig fails with:

ifconfig: cannot ping in.mpathd: Timer expired
main: is another instance of in.mpathd already active?

dmesg shows:

Mar 8 23:17:00 xxx in.mpathd87: [ID 285869 daemon.error] aggr0vlan1319: cannot open: Too many open files
Mar 8 23:17:00 xxx in.mpathd87: [ID 211331 daemon.error] phyint_inst_init_from_k: unable to create phyint aggr0vlan1319

Adding ulimit -n 65536 to /lib/svc/method/net-physical works around this, and adding this permanently may be an okay solution.

Actions #1

Updated by Rich Lowe about 10 years ago

If we're doing this, we may want in.mpathd to do the right thing

Actions #2

Updated by Rich Lowe about 10 years ago

The appropriate idiom is, iirc:

    getrlimit(RLIM_NOFILE, &foo);
    foo.rlim_cur = foo.rlim_max;
    setrlimit(RLIM_NOFILE, &foo);
    enable_extended_FILE_stdio(-1, -1);

To set the current limit to the maximal one, at startup, and enable extended FILE lest opening the config file (or whatever), gets an fd > 255 into a FILE

Actions #3

Updated by Andrew Stormont over 8 years ago

ulimit -n should be greater that 256 anyway. On my box it's 1024. And as Rich said in.mpathd wouldn't be able to use any more than 256 unless enable_extended_FILE_stdio is called anyway - regardless of what ulimit -n is set to.

Actions

Also available in: Atom PDF