I have changed the /etc/security/limits.conf
file and set the nofile
to 4096, and it returns 4096 if I run ulimits -n
in an ssh session. But after I run tmux in the same session, ulimit -n
returns 1024, which was the default limit.
I think this limit should be inherited from the session that starts tmux, but it turns out not. Why? And how should I do to change the limit in a tmux session?
Asked
Active
Viewed 333 times
0
![](../../users/profiles/171778.webp)
leetom
- 111
- 3
-
What operating system? What version? – Michael Hampton Nov 04 '20 at 08:51
-
@MichaelHampton Ubuntu 16.04 – leetom Nov 25 '20 at 08:39
1 Answers
1
All the tmux sessions are forked from the same tmux process, instead of the shell process that is executing tmux
. Although I have reopened the tmux session, it is still forked from the old tmux process, which is started before I have changed the /etc/security/limits.conf
and already running for a while, and sure the old process's children will use the old configuration.
![](../../users/profiles/171778.webp)
leetom
- 111
- 3