LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   limits.conf not working (http://www.linuxquestions.org/questions/linux-server-73/limits-conf-not-working-795332/)

Rundi 03-14-2010 10:47 AM

limits.conf not working
 
Hello -

I entered the following line into the limits.conf file:

Code:

coldclim        hard    nproc          15
This was to keep the user coldclim from running to many processes and using up server memory.

When I log into ssh as coldclim and run "ulimit - u" I get back the answer of "15" which tells me the limits.conf is active.

. . . but here is the confusing part. A recent snapshot from the tops log shows the following:

Quote:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25817 coldclim 34 18 24116 10m 5376 R 5.2 2.1 0:00.10 php
25901 root 18 0 8228 5312 1244 S 5.2 1.0 0:00.03 tailwatchd
25789 coldclim 34 18 26316 12m 5432 R 3.5 2.5 0:00.14 php
25792 coldclim 34 18 26324 12m 5432 R 3.5 2.5 0:00.15 php
25793 coldclim 34 18 25536 11m 5432 R 3.5 2.3 0:00.12 php
25819 coldclim 34 18 27884 14m 5432 R 3.5 2.8 0:00.20 php
25823 coldclim 34 18 26316 12m 5432 R 3.5 2.5 0:00.16 php
25836 coldclim 34 18 23856 10m 5276 R 3.5 2.0 0:00.09 php
25842 coldclim 34 18 23204 9432 5092 R 3.5 1.8 0:00.06 php
25846 coldclim 34 18 26324 12m 5432 R 3.5 2.5 0:00.15 php
25850 coldclim 34 18 24368 10m 5388 R 3.5 2.1 0:00.10 php
25860 coldclim 34 18 22664 8696 4584 R 3.5 1.7 0:00.05 php
25863 coldclim 34 18 21044 5720 3316 R 3.5 1.1 0:00.03 php
25868 coldclim 34 18 19632 4292 2984 R 3.5 0.8 0:00.02 php
25880 coldclim 34 18 19624 4360 2996 R 3.5 0.8 0:00.02 php
25884 coldclim 34 18 18400 3332 2640 R 3.5 0.6 0:00.02 php
25753 coldclim 34 18 27352 13m 5432 R 1.7 2.7 0:00.18 php
25762 coldclim 34 18 26328 13m 5432 R 1.7 2.5 0:00.16 php
25787 coldclim 34 18 25540 11m 5432 R 1.7 2.3 0:00.12 php
25797 coldclim 34 18 25536 11m 5432 R 1.7 2.3 0:00.13 php
25810 coldclim 34 18 23196 9860 5092 R 1.7 1.9 0:00.07 php
25821 coldclim 34 18 26328 13m 5432 R 1.7 2.5 0:00.16 php
25838 coldclim 34 18 25540 11m 5432 R 1.7 2.3 0:00.12 php
25839 coldclim 34 18 24372 10m 5388 R 1.7 2.1 0:00.11 php
25862 coldclim 35 18 21044 5748 3340 R 1.7 1.1 0:00.03 php
25870 coldclim 34 18 19624 4176 2968 R 1.7 0.8 0:00.02 php
25865 coldclim 34 18 19632 4460 3016 R 1.7 0.9 0:00.02 php
25882 ethereal 34 18 18404 3240 2564 R 1.7 0.6 0:00.01 php
25883 coldclim 34 18 19620 4304 2988 R 1.7 0.8 0:00.02 php
25885 coldclim 34 18 17984 2408 1848 R 1.7 0.5 0:00.01 php
25889 coldclim 34 18 17736 664 408 R 1.7 0.1 0:00.01 php
There are about 30 processes listed there with the user "coldclim." How can that be when I set the process limit for that user to 15?

Any help would be much appreciated.

troop 03-14-2010 10:56 AM

Quote:

The settings in limits.conf are only applied to normal interactive user logins. These settings don't apply to processes started at boot time, via cron, etc.
(c) http://ubuntuforums.org/showthread.php?t=824966

Rundi 03-14-2010 01:40 PM

Thank you. That clears things up.

Hm. This leaves the question of how I will stop the user from creating so many php process, but at least now I know why ulimits wasn't doing it.


All times are GMT -5. The time now is 06:31 PM.