[SR-Dev] module startup: Process limit of 36 exceeded.
andrei at iptel.org
Wed Apr 8 15:38:04 CEST 2009
On Apr 08, 2009 at 12:50, Henning Westerholt <henning.westerholt at 1und1.de> wrote:
> i've tried to run some of my tests written for kamailio on kamailio-3.0 in
> order to check if the modules can be load. With test/2.cfg i've run into this
> BUG: <core> [pt.c:283]: ERROR: fork_process(): Process limit of 36 exceeded.
> Will simulate fork fail.
> Is this something critical? Why is there a limit on the process number and how
> can i extend this?
It's not limited, but every new process must first be registered. In the
case of a module, if you want to start 2 processes (for example) you
have to call from mod_init: register_procs(2).
This is used to properly size-up the process table. If you don't call it
when the number of registered processes is exceeded, fork will fail.
(modules init and starting processes is documented in
Another important thing: if one opens file descriptors globally
(e.g. from mod_init or child_init(*)), their maximum number should be
registered from mod_init with register_fds(no)). Not doing this might
result in strange problems at runtime, since there are parts of code
that need to know the maximum fd number (e.g. tcp in most cases, the ctl
module a.s.o.). There are some very conservative defaults, but it's much
safer not to rely on them an register instead the maximum number of fds
More information about the sr-dev