Bug #2266
openin.mpathd limited to 255 file descriptors
0%
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.
Updated by Rich Lowe over 11 years ago
If we're doing this, we may want in.mpathd to do the right thing
Updated by Rich Lowe over 11 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
Updated by Andrew Stormont over 9 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.