2 replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
source | link

I was trying to set up 2000 concurrent ssh connections, but got the error message in server log (i.e. journalctl):

sshd[1356]: error: reexec socketpair: Too many open files

I've set both the soft and hard limit for nofile in /etc/security/limits.conf, and ulimit -n gives me 1 048 000.

Also, Max open files in /proc/<ssh_pid>/limitsis 1 048 000, which is consistent with the value of nofile mentioned above (i.e. the value for ulimit).

When my script for setting up ssh connections was running, I tried lsof | wc -l several times and the values it gave me were around 260 000, which is much less than the open file limit.

So my question is why it complains about "Too many open files" when the actual number of open files is far below the limit?

This question seems similar but I still don't know what to do after reading it: http://unix.stackexchange.com/questions/66863/freebsd-too-many-open-files-but-should-be-able-to-open-another-160-000-filesFreeBSD: "Too many open files" but should be able to open another 160,000 files

Any idea is appreciated!

I was trying to set up 2000 concurrent ssh connections, but got the error message in server log (i.e. journalctl):

sshd[1356]: error: reexec socketpair: Too many open files

I've set both the soft and hard limit for nofile in /etc/security/limits.conf, and ulimit -n gives me 1 048 000.

Also, Max open files in /proc/<ssh_pid>/limitsis 1 048 000, which is consistent with the value of nofile mentioned above (i.e. the value for ulimit).

When my script for setting up ssh connections was running, I tried lsof | wc -l several times and the values it gave me were around 260 000, which is much less than the open file limit.

So my question is why it complains about "Too many open files" when the actual number of open files is far below the limit?

This question seems similar but I still don't know what to do after reading it: http://unix.stackexchange.com/questions/66863/freebsd-too-many-open-files-but-should-be-able-to-open-another-160-000-files

Any idea is appreciated!

I was trying to set up 2000 concurrent ssh connections, but got the error message in server log (i.e. journalctl):

sshd[1356]: error: reexec socketpair: Too many open files

I've set both the soft and hard limit for nofile in /etc/security/limits.conf, and ulimit -n gives me 1 048 000.

Also, Max open files in /proc/<ssh_pid>/limitsis 1 048 000, which is consistent with the value of nofile mentioned above (i.e. the value for ulimit).

When my script for setting up ssh connections was running, I tried lsof | wc -l several times and the values it gave me were around 260 000, which is much less than the open file limit.

So my question is why it complains about "Too many open files" when the actual number of open files is far below the limit?

This question seems similar but I still don't know what to do after reading it: FreeBSD: "Too many open files" but should be able to open another 160,000 files

Any idea is appreciated!

    Tweeted twitter.com/StackUnix/status/751963598335991808
1
source | link

"Too many open files ssh" when the number of open files is far below ulimit

I was trying to set up 2000 concurrent ssh connections, but got the error message in server log (i.e. journalctl):

sshd[1356]: error: reexec socketpair: Too many open files

I've set both the soft and hard limit for nofile in /etc/security/limits.conf, and ulimit -n gives me 1 048 000.

Also, Max open files in /proc/<ssh_pid>/limitsis 1 048 000, which is consistent with the value of nofile mentioned above (i.e. the value for ulimit).

When my script for setting up ssh connections was running, I tried lsof | wc -l several times and the values it gave me were around 260 000, which is much less than the open file limit.

So my question is why it complains about "Too many open files" when the actual number of open files is far below the limit?

This question seems similar but I still don't know what to do after reading it: http://unix.stackexchange.com/questions/66863/freebsd-too-many-open-files-but-should-be-able-to-open-another-160-000-files

Any idea is appreciated!