kernel: maxproc limit exceeded

I can't seem to find a solution to this.. I've been to several IRC channels and no luck so far.

Server info:

FreeBSD x 7.0-RELEASE-p8 FreeBSD 7.0-RELEASE-p8 #0: Sat Jan 10 03:59:23 EST 2009 root@x:/usr/obj/usr/src/sys/x i386

Background: I'm trying to run two TeamSpeak servers on the same account. The server spawns many processes, currently exceeding the value listed when I run the 'limits' command, leading to the processes being killed:

/var/log/messages said:
kernel: maxproc limit exceeded by uid 1061, please see tuning(7) and login.conf(5).

[motivez@x ~]$ limits
Resource limits (current):
cputime infinity secs
filesize infinity kB
datasize 200000 kB
stacksize 8192 kB
coredumpsize 200000 kB
memoryuse 200000 kB
memorylocked infinity kB
maxprocesses 20
openfiles 100
sbsize infinity bytes
vmemoryuse 200000 kB

However, in my login.conf I have specified a limit greater than that value.. so, wherever that value is set is not respecting the way I have login.conf currently set up for the account.

Code:
admin:\
[b]        :maxproc=unlimited:\[/b]
        :cputime=unlimited:\
        :filesize=unlimited:\
        :datasize=unlimited:\
        :memorylocked=unlimited:\
        :stacksize=unlimited:\
        :memoryuse=unlimited:\
        :vmemoryuse=unlimited:\
        :openfiles=4096:\
        :tc=default:

[root@x ~]# pw usershow -u 1061
motivez:*:1061:1063:[b]admin[/b]:0:0:User &:/usr/home/motivez:/bin/bash

I ran the cap_mkdb /etc/login.conf command after making changes, although my 'default' has maxproc as unlimited as well, so in theory, there should be no limits currently.

[motivez@x ~]$ ulimit
unlimited

[root@x ~]# sysctl -a | grep kern.max
kern.maxvnodes: 69121
kern.maxproc: 6164
kern.maxfiles: 12328
kern.maxfilesperproc: 11095
kern.maxprocperuid: 5547
kern.maxusers: 384

There's nothing in /boot/loader.conf or /etc/sysctl.conf about the kern.maxproc or anything like that.

Anyone have any ideas? I can't figure out why the information in login.conf isn't being respected, and I can't figure out where the 20 is coming from in with the limits command.. or how to change it.
 
IIRC MAXPROC is set on the fly and is calculated by the amount of memory in your machine. You can also hardcode it in the kernel config. Again IIRC fbsd5 had this in the GENERIC config. If you're using an older kernel conf try and remove the MAXPROC.

These are mine:
Code:
dice@williscorto:~>limits
Resource limits (current):
  cputime          infinity secs
  filesize         infinity kB
  datasize           524288 kB
  stacksize           65536 kB
  coredumpsize     infinity kB
  memoryuse        infinity kB
  memorylocked     infinity kB
  maxprocesses         5547
  openfiles           22500
  sbsize           infinity bytes
  vmemoryuse       infinity kB
 
have you logged out and in after you changed login.conf?
 
I'm having almost exact the same problem, but with 'openfiles.' I think I've done pretty much everything. Similarly to motivez, the 'limit' value never seems to change, and limits.conf is set to 'unlimited'. For some reason I don't think the login.conf settings takes affect, as I tried to set a value, logout and in again, but the value was still the same.

I've also tried to override the value by hand, but fail to do so too.

Code:
$ ulimit -n
2656
$ ulimit -n 20000
-bash: ulimit: open files: cannot modify limit: Operation not permitted

The server is running 7.0. I've spent hours Googling, but can't seem to find any solution.
 
I found the solution to at least my problem. By raising the sysctl values (kern.maxfiles and kern.maxfilesperproc) and then logout and in again, 'uname -n' was raised to the value of 'kern.maxfilesperproc'
 
Hello, am having this exact issue "maxproc limit exceeded by uid 0, please see tuning and login.conf". Unfortunately I can't SSH into the server. I plan to reboot, maybe this will fix my issue.
 
Back
Top