Skip to content
Advertisement

Processes running from tmux session have different resource limit?

I’m trying to change the stack limit in /etc/security/limits.conf to the following:

JavaScript

This works when I’m running a process directly (will explain what is indirect below) on that host:

JavaScript

But when I’m running the same program from within a tmux session (“indirectly”, as opposed to the above), it is different:

JavaScript

Does tmux has a different priviledge? The strange thing I noticed that is in the working case, both Soft and Hard limits are equal to the “hard” value I set in limits.conf while in the broken case both equal to the “soft” value.

Any help/reference is appreciated.

Advertisement

Answer

The problem can appear because of long-running tmux server in the background which even survives logout/login for the active session.

Whenever you create new tmux sessions they are created within the existing background server process, thus using old limits.

Try killing all running tmux processes. Also, you may want to read this https://unix.stackexchange.com/questions/108603/do-changes-in-etc-security-limits-conf-require-a-reboot

Advertisement