1

On Fedora FC20. /etc/security/limits.conf has:

* soft nofile 60000
* hard nofile 60000
* soft nproc 30000
* hard nproc 30000

After logging in through GDM, and opening a shell, the limits are 60000 for files (right), and 1024 for number of processes.

I'm trying to understand how does GDM (or what else in the process of starting up X session) set the ulimits, specifically restricting the nproc. I tried inserting ulimit -u 30000 into /etc/X11/xinit/Xsession, and that didn't help either.

There are no ulimit statements anywhere in profile files, neither in /etc/ nor in ~/

(the reason I care is because I have X apps that start running out of fork due to this ulimit, and I don't feel like running them from a terminal).

1 Answer 1

0

On newer Linux'es, when you set the limits in /etc/security/limits.conf look (especially if changes don't seem to work) into /etc/security/limits.d/. Files in this directory are processed after limits.conf, and override any changes in order.

Specifically to address https://bugzilla.redhat.com/show_bug.cgi?id=432903, there was a soft cap put on nproc for all the users besides root, to

prevent accidental fork bombs.

In other words, always check /etc/security/limits.conf and /etc/security/limits.d/ for your ulimits (and thoroughly read limits.conf(5) which I should have done in the beginning).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .