Hi Mahmood Naderan!

 On 2013.10.23 at 16:00:44 -0700, Mahmood Naderan wrote next:

> # pgrep -u mahmood | wc -l
> 2118

Actually,  IIRC situation might be even worse because threads are
counting towards that limit, try
pgrep -w -u mahmood|wc -l

>
>
> !! That's it
>
>
> I will change that. Meanwhile, what will happen to the those which are beyond 
> the limit? Are they running?

Please read "man limits.conf" about syntax.
Sysctl isn't related to that (it's used for setting kernel parameters);
please don't touch it. You broke system by setting fs.file-max WAY too
low, please execute
sysctl -w fs.file-max=1628920
and remove fs.file-max entry from /etc/sysctl.conf.

Like I said, /etc/security/limits.d/90-nproc.conf is example of config.
You need to create file like
/etc/security/limits.d/99-local.conf
with contents like
<user>  soft    nproc   8192
<user>  hard    nproc   8192

There is no need to reboot, but you need to relog into that user (and
restart currently running processes under that user) - the limit is set
upon login and will only affect new sessions.

You should diagnose the situation to understand how you got 2118
processes running. This is unusual, typical desktop session uses less
than 100. Some server applications that utilize thousands of threads
(especially common for some java applications) sometimes need very high
nproc limit, but this usually happens only for server workload. You
should investigate how usual user got so many processes running, it
might be a fork bomb or somethjing.

-- 
 
Vladimir

Reply via email to