Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jul 1998 11:14:08 -0700 (PDT)
From:      Brian Tiemann <btman@ugcs.caltech.edu>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Problems with process limits
Message-ID:  <Pine.BSF.4.01.9807271105190.2574-100000@lionking.org>
In-Reply-To: <Pine.BSF.4.00.9807241059330.24191-100000@lionking.org>

next in thread | previous in thread | raw e-mail | index | archive | help


	I'm hoping my message only got lost in the shuffle, and not that
nobody has an answer to my predicament. :P I'll repeat the message...
here's hoping some kind soul has dealt with this before and knows how to
fix it.

	As clarification, I'm running a custom kernel with (I thought)
adequate settings:

machine         "i386"
cpu             "I386_CPU"
cpu             "I486_CPU"
cpu             "I586_CPU"
cpu             "I686_CPU"
ident           LIONKING
maxusers        256

options         MATH_EMULATE            #Support for x87 emulation
options         INET                    #InterNETworking
options         FFS                     #Berkeley Fast Filesystem
options         NFS                     #Network Filesystem
options         MSDOSFS                 #MSDOS Filesystem
options         "CD9660"                #ISO 9660 Filesystem
options         PROCFS                  #Process filesystem
options         "COMPAT_43"             #Compatible with BSD 4.3 [KEEP THIS!]
options         SCSI_DELAY=15           #Be pessimistic about Joe SCSI device
options         BOUNCE_BUFFERS          #include support for DMA bounce buffers
options         UCONSOLE                #Allow users to grab the console
options         FAILSAFE                #Be conservative
options         USERCONFIG              #boot -c editor
options         VISUAL_USERCONFIG       #visual boot -c editor
#options         MAXMEM=130048
#options         SOMAXCONN=256           # max pending connects
options         NMBCLUSTERS=4096        # mbuf clusters at 4096
options         CHILD_MAX=512           # maximum number of child processes
options         OPEN_MAX=768            # maximum fds (breaks RPC svcs)


	Nonetheless, it starts being unable to spawn new httpd process
(running as "www") once it's got about, oh, 128 of them going. If anyone
sees any gaping errors in my "www" class (below), could you please let me
know?

	Could this be something about the RAM ceiling that FreeBSD places
on certain applications (at least, according to LINT)? To wit:

# Certain applications can grow to be larger than the 128M limit
# that FreeBSD initially imposes.  Below are some options to
# allow that limit to grow to 256MB, and can be increased further
# with changing the parameters.  MAXDSIZ is the maximum that the
# limit can be set to, and the DFLDSIZ is the default value for
# the limit.  You might want to set the default lower than the
# max, and explicitly set the maximum with a shell command for processes
# that regularly exceed the limit like INND.
#
options         "MAXDSIZ=(256*1024*1024)"
options         "DFLDSIZ=(256*1024*1024)"

	So does that mean it will aggregate all the httpd processes
together and not allow them to use more than 128MB total? Is this new to 
2.2.6-ish? If that's the case, I guess I'd have to add those options...
does this look familiar to anyone?

	Thanks...


On Fri, 24 Jul 1998, Brian Tiemann wrote:

> 
> 	Hi... I'm having a problem with a high-load webserver that I hope
> someone can help me with.
> 
> 	I'm running 2.2.6... the server is sustaining a pretty regular 30
> httpd processes at any one time. However, when it spikes up to around 128
> or so (total system processes over 160), I start getting "Couldn't spawn
> child process" messages in my error_log.
> 
> 	httpd runs as "www"; the www user is in a class called "www".
> Here's the entry in login.conf:
> 
> www:\   
>         :path=/bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\
>         :cputime=infinity:\
>         :filesize=128M:\  
>         :datasize-cur=64M:\
>         :stacksize-cur=32M:\
>         :coredumpsize-cur=0:\
>         :maxmemorysize-cur=128M:\
>         :memorylocked=32M:\ 
>         :maxproc=512:\  
>         :maxproc-cur=256:\
>         :openfiles=512:\
>         :tc=default:
> 
> 
> 	I managed to solve this using login.conf in 2.2.2, but I can't
> seem to get it to behave here. Is there something I'm missing? 
> 
> 	Thanks!
> 
> Brian
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9807271105190.2574-100000>