Date: Fri, 3 Apr 1998 20:02:26 +1000 (EST) From: Andrew Heath <drew@bluetongue.com.au> To: questions@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Memory Leak??? Apache, CGI, can't spawn child process Message-ID: <Pine.BSF.3.96.980403195217.1028A-400000@skink.bluetongue.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Dear Questions....
I am at a loss to explain my problem, I have tried almost everything I can
think of with our configuration, and I am running into major problems.
We run a webserver which supports about 50 clients, and uses alot of CGI
developed scripts as a back end.
The server seems to have some sort of memory leak, and I cannot for the
life of me plug it.
I have included the sysctl -a output, the kernel configuration and the
httpd configuration as attachments in the hope that someone will see
something that I can't.
The 'top' output from our server looks like this:
last pid: 1173; load averages: 0.07, 0.09, 0.08 19:58:40
49 processes: 1 running, 48 sleeping
CPU states: 1.0% user, 0.0% nice, 1.5% system, 1.9% interrupt, 95.6%
idle
Mem: 60M Active, 14M Inact, 16M Wired, 8344K Buf, 34M Free
Swap: 384M Total, 128K Used, 384M Free
We have 128 Mb RAM and are running 2.2.5 release on a Pentium Pro 200.
I appreciate any assistance here, as our server is now continually comung
up with a CGI can't spawn child process error, and as we are running a
reasonable heavily loaded server, this is a problem.
FYI we are also running a reasonable loaded DNS server, and Hughes
MiniSQL. The mimiSQL server is running as "nobody"
I look forward to your replies.
Regards,
Andrew Heath
Andrew Heath Phone 03 9344 9324
Technical Director Fax 03 9344 9362
Blue Tongue Software Pty Ltd Mobile 0419 335 398
Level 3, 207 Bouverie Street, Carlton 3053 email drew@bluetongue.com.au
[-- Attachment #2 --]
kern.ostype: FreeBSD
kern.osrelease: 2.2.5-RELEASE
kern.osrevision: 199506
kern.version: FreeBSD 2.2.5-RELEASE #0: Thu Mar 19 16:49:23 EST 1998
root@skink.bluetongue.com:/usr/src/sys/compile/SKINK
kern.maxvnodes: 8837
kern.maxproc: 1044
kern.maxfiles: 2088
kern.argmax: 65536
kern.securelevel: -1
kern.hostname: skink.bluetongue.com
kern.hostid: 0
kern.clockrate: { hz = 100, tick = 10000, profhz = 1024, stathz = 128 }
kern.posix1version: 199009
kern.ngroups: 16
kern.job_control: 1
kern.saved_ids: 0
kern.boottime: { sec = 891594879, usec = 250000 } Fri Apr 3 19:14:39 1998
kern.domainname:
kern.update: 30
kern.osreldate: 225000
kern.bootfile: /kernel
kern.maxfilesperproc: 2088
kern.maxprocperuid: 1043
kern.dumpdev: { major = 255, minor = -65281 }
kern.somaxconn: 128
kern.maxsockbuf: 262144
kern.ps_strings: -272637968
kern.usrstack: -272637952
kern.shutdown_timeout: 120
kern.acct_suspend: 2
kern.acct_resume: 4
kern.acct_chkfreq: 15
kern.quantum: 10
kern.sockbuf_waste_factor: 8
kern.consmute: 0
vm.loadavg: { 0.03 0.12 0.09 }
vm.v_free_min: 313
vm.v_free_target: 1094
vm.v_free_reserved: 155
vm.v_inactive_target: 7676
vm.v_cache_min: 3742
vm.v_cache_max: 14969
vm.v_pageout_free_min: 34
vm.pageout_algorithm: 0
vm.swapping_enabled: 1
vfs.nfs.nfs_privport: 0
vfs.nfs.async: 0
vfs.nfs.gatherdelay: 10000
vfs.nfs.gatherdelay_v3: 0
vfs.nfs.defect: 0
vfs.nfs.diskless_valid: 0
vfs.nfs.diskless_rootpath:
vfs.nfs.diskless_swappath:
net.inet.ip.portrange.lowfirst: 1023
net.inet.ip.portrange.lowlast: 600
net.inet.ip.portrange.first: 1024
net.inet.ip.portrange.last: 5000
net.inet.ip.portrange.hifirst: 40000
net.inet.ip.portrange.hilast: 44999
net.inet.ip.forwarding: 0
net.inet.ip.redirect: 1
net.inet.ip.ttl: 64
net.inet.ip.rtexpire: 1600
net.inet.ip.rtminexpire: 10
net.inet.ip.rtmaxcache: 128
net.inet.ip.sourceroute: 0
net.inet.ip.intr_queue_maxlen: 50
net.inet.ip.intr_queue_drops: 0
net.inet.ip.subnets_are_local: 0
net.inet.icmp.maskrepl: 0
net.inet.icmp.bmcastecho: 1
net.inet.tcp.rfc1323: 1
net.inet.tcp.rfc1644: 1
net.inet.tcp.mssdflt: 512
net.inet.tcp.rttdflt: 3
net.inet.tcp.keepidle: 14400
net.inet.tcp.keepintvl: 150
net.inet.tcp.sendspace: 16384
net.inet.tcp.recvspace: 16384
net.inet.tcp.keepinit: 150
net.inet.tcp.log_in_vain: 0
net.inet.tcp.always_keepalive: 0
net.inet.udp.checksum: 1
net.inet.udp.maxdgram: 9216
net.inet.udp.recvspace: 41600
net.inet.udp.log_in_vain: 0
net.link.generic.system.ifcount: 5
net.link.ether.inet.prune_intvl: 300
net.link.ether.inet.max_age: 1200
net.link.ether.inet.host_down_time: 20
net.link.ether.inet.maxtries: 5
net.link.ether.inet.useloopback: 1
net.link.ether.inet.proxyall: 0
debug.elf_trace: 0
debug.fdexpand: 4
debug.ttydebug: 0
debug.vfscache: 1
debug.if_tun_debug: 0
debug.ncr_debug: 0
debug.doasyncfree: 1
debug.ahb_debug: 0
debug.bt_debug: 0
hw.machine: i386
hw.model: Pentium Pro
hw.ncpu: 1
hw.byteorder: 1234
hw.physmem: 132382720
hw.usermem: 116011008
hw.pagesize: 4096
hw.floatingpoint: 1
hw.machine_arch: ibm-pc
machdep.consdev: { major = 0, minor = 0 }
machdep.adjkerntz: -36000
machdep.disable_rtc_set: 0
machdep.wall_cmos_clock: 1
machdep.do_dump: 1
machdep.i8254_freq: 1193182
machdep.i586_freq: 198948489
user.cs_path: /usr/bin:/bin:/usr/sbin:/sbin:
user.bc_base_max: 99
user.bc_dim_max: 2048
user.bc_scale_max: 99
user.bc_string_max: 1000
user.coll_weights_max: 0
user.expr_nest_max: 32
user.line_max: 2048
user.re_dup_max: 255
user.posix2_version: 199212
user.posix2_c_bind: 0
user.posix2_c_dev: 0
user.posix2_char_term: 0
user.posix2_fort_dev: 0
user.posix2_fort_run: 0
user.posix2_localedef: 0
user.posix2_sw_dev: 0
user.posix2_upe: 0
user.stream_max: 20
user.tzname_max: 255
[-- Attachment #3 --]
#
# GENERIC -- Generic machine with WD/AHx/NCR/BTx family disks
#
# For more information read the handbook part System Administration ->
# Configuring the FreeBSD Kernel -> The Configuration File.
# The handbook is available in /usr/share/doc/handbook or online as
# latest version from the FreeBSD World Wide Web server
# <URL:http://www.FreeBSD.ORG/>
#
# An exhaustive list of options and more detailed explanations of the
# device lines is present in the ./LINT configuration file. If you are
# in doubt as to the purpose or necessity of a line, check first in LINT.
#
# $Id: GENERIC,v 1.77.2.8 1997/04/18 14:06:20 nate Exp $
machine "i386"
#cpu "I386_CPU"
#cpu "I486_CPU"
#cpu "I586_CPU"
cpu "I686_CPU"
ident SKINK
maxusers 64
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=8 #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 INCLUDE_CONFIG_FILE
options NMBCLUSTERS=1024
options CHILD_MAX=256
options OPEN_MAX=512
options "MD5"
options PERFMON
options QUOTA
options "MAXMEM=131072"
config kernel root on wd0
controller isa0
controller eisa0
controller pci0
controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
disk fd0 at fdc0 drive 0
disk fd1 at fdc0 drive 1
tape ft0 at fdc0 drive 2
controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
disk wd0 at wdc0 drive 0
disk wd1 at wdc0 drive 1
controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr
disk wd2 at wdc1 drive 0
disk wd3 at wdc1 drive 1
options ATAPI #Enable ATAPI support for IDE bus
options ATAPI_STATIC #Don't do it as an LKM
device wcd0 #IDE CD-ROM
# A single entry for any of these controllers (ncr, ahb, ahc, amd) is
# sufficient for any number of installed devices.
controller ncr0
controller amd0
controller ahb0
controller ahc0
controller bt0 at isa? port "IO_BT0" bio irq ? vector bt_isa_intr
controller uha0 at isa? port "IO_UHA0" bio irq ? drq 5 vector uhaintr
controller aha0 at isa? port "IO_AHA0" bio irq ? drq 5 vector ahaintr
controller aic0 at isa? port 0x340 bio irq 11 vector aicintr
controller nca0 at isa? port 0x1f88 bio irq 10 vector ncaintr
controller nca1 at isa? port 0x350 bio irq 5 vector ncaintr
controller sea0 at isa? bio irq 5 iomem 0xc8000 iosiz 0x2000 vector seaintr
controller scbus0
device sd0
device od0 #See LINT for possible `od' options.
device st0
device cd0 #Only need one of these, the code dynamically grows
device wt0 at isa? port 0x300 bio irq 5 drq 1 vector wtintr
device mcd0 at isa? port 0x300 bio irq 10 vector mcdintr
controller matcd0 at isa? port 0x230 bio
device scd0 at isa? port 0x230 bio
# syscons is the default console driver, resembling an SCO console
device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
# Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
#device vt0 at isa? port "IO_KBD" tty irq 1 vector pcrint
#options PCVT_FREEBSD=210 # pcvt running on FreeBSD >= 2.0.5
#options XSERVER # include code for XFree86
#options FAT_CURSOR # start with block cursor
# If you have a ThinkPAD, uncomment this along with the rest of the PCVT lines
#options PCVT_SCANSET=2 # IBM keyboards are non-std
# Mandatory, don't remove
device npx0 at isa? port "IO_NPX" flags 0x1 irq 13 vector npxintr
#
# Laptop support (see LINT for more options)
#
device apm0 at isa? disable # Advanced Power Management
options APM_BROKEN_STATCLOCK # Workaround some buggy APM BIOS
# PCCARD (PCMCIA) support
#controller crd0
#device pcic0 at crd?
#device pcic1 at crd?
device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
device sio2 at isa? disable port "IO_COM3" tty irq 5 vector siointr
device sio3 at isa? disable port "IO_COM4" tty irq 9 vector siointr
device lpt0 at isa? port? tty irq 7 vector lptintr
device lpt1 at isa? port? tty
device mse0 at isa? port 0x23c tty irq 5 vector mseintr
device psm0 at isa? disable port "IO_KBD" conflicts tty irq 12 vector psmintr
# Order is important here due to intrusive probes, do *not* alphabetize
# this list of network interfaces until the probes have been fixed.
# Right now it appears that the ie0 must be probed before ep0. See
# revision 1.20 of this file.
device de0
device fxp0
device vx0
device ed0 at isa? port 0x280 net irq 5 iomem 0xd8000 vector edintr
device ed1 at isa? port 0x300 net irq 5 iomem 0xd8000 vector edintr
device ie0 at isa? port 0x300 net irq 10 iomem 0xd0000 vector ieintr
device ie1 at isa? port 0x360 net irq 7 iomem 0xd0000 vector ieintr
device ep0 at isa? port 0x300 net irq 10 vector epintr
device ex0 at isa? port 0x300 net irq 10 iomem 0xd0000 vector exintr
device fe0 at isa? port 0x300 net irq ? vector feintr
device le0 at isa? port 0x300 net irq 5 iomem 0xd0000 vector le_intr
device lnc0 at isa? port 0x280 net irq 10 drq 0 vector lncintr
device ze0 at isa? port 0x300 net irq 5 iomem 0xd8000 vector zeintr
device zp0 at isa? port 0x300 net irq 10 iomem 0xd8000 vector zpintr
pseudo-device loop
pseudo-device ether
pseudo-device log
pseudo-device sl 1
# ijppp uses tun instead of ppp device
#pseudo-device ppp 1
pseudo-device vn 1
pseudo-device tun 1
pseudo-device pty 16
pseudo-device gzip # Exec gzipped a.out's
# KTRACE enables the system-call tracing facility ktrace(2).
# This adds 4 KB bloat to your kernel, and slightly increases
# the costs of each syscall.
options KTRACE #kernel tracing
[-- Attachment #4 --]
# This is the main server configuration file. See URL http://www.apache.org/
# for instructions.
# Do NOT simply read the instructions in here without understanding
# what they do, if you are unsure consult the online docs. You have been
# warned.
# Originally by Rob McCool
# ServerType is either inetd, or standalone.
ServerType standalone
# If you are running from inetd, go to "ServerAdmin".
# Port: The port the standalone listens to. For ports < 1023, you will
# need httpd to be run as root initially.
Port 80
# HostnameLookups: Log the names of clients or just their IP numbers
# e.g. www.apache.org (on) or 204.62.129.132 (off)
# You should probably turn this off unless you are going to actually
# use the information in your logs, or with a CGI. Leaving this on
# can slow down access to your site.
HostnameLookups on
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
# User/Group: The name (or #number) of the user/group to run httpd as.
# On SCO (ODT 3) use User nouser and Group nogroup
# On HPUX you may not be able to use shared memory as nobody, and the
# suggested workaround is to create a user www and use that user.
User nobody
Group nobody
#-1
# The following directive disables keepalives and HTTP header flushes for
# Netscape 2.x and browsers which spoof it. There are known problems with
# these
BrowserMatch Mozilla/2 nokeepalive
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.
ServerAdmin admin@bluetongue.com
# ServerRoot: The directory the server's config, error, and log files
# are kept in
ServerRoot /opt/local/www/httpd
# BindAddress: You can support virtual hosts with this option. This option
# is used to tell the server which IP address to listen to. It can either
# contain "*", an IP address, or a fully qualified Internet domain name.
# See also the VirtualHost directive.
#BindAddress *
# ErrorLog: The location of the error log file. If this does not start
# with /, ServerRoot is prepended to it.
ErrorLog /var/www/error_log
# TransferLog: The location of the transfer log file. If this does not
# start with /, ServerRoot is prepended to it.
TransferLog /var/www/access_log
#AgentLog /var/www/access_log
#RefererLog /var/www/referer_log
# PidFile: The file the server should log its pid to
PidFile logs/httpd.pid
# ScoreBoardFile: File used to store internal server process information.
# Not all architectures require this. But if yours does (you'll know because
# this file is created when you run Apache) then you *must* ensure that
# no two invocations of Apache share the same scoreboard file.
ScoreBoardFile logs/apache_status
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e. use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
ServerName www.bluetongue.com
# CacheNegotiatedDocs: By default, Apache sends Pragma: no-cache with each
# document that was negotiated on the basis of content. This asks proxy
# servers not to cache the document. Uncommenting the following line disables
# this behavior, and proxies will be allowed to cache the documents.
CacheNegotiatedDocs
# Timeout: The number of seconds before receives and sends time out
Timeout 300
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
KeepAlive On
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We reccomend you leave this number high, for maximum performance.
MaxKeepAliveRequests 50
# KeepAliveTimeout: Number of seconds to wait for the next request
KeepAliveTimeout 5
# Server-pool size regulation. Rather than making you guess how many
# server processes you need, Apache dynamically adapts to the load it
# sees --- that is, it tries to maintain enough server processes to
# handle the current load, plus a few spare servers to handle transient
# load spikes (e.g., multiple simultaneous requests from a single
# Netscape browser).
# It does this by periodically checking how many servers are waiting
# for a request. If there are fewer than MinSpareServers, it creates
# a new spare. If there are more than MaxSpareServers, some of the
# spares die off. These values are probably OK for most sites ---
MinSpareServers 5
MaxSpareServers 5
# Number of servers to start --- should be a reasonable ballpark figure.
StartServers 10
# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
# It is intended mainly as a brake to keep a runaway server from taking
# Unix with it as it spirals down...
MaxClients 50
# MaxRequestsPerChild: the number of requests each child process is
# allowed to process before the child dies.
# The child will exit so as to avoid problems after prolonged use when
# Apache (and maybe the libraries it uses) leak. On most systems, this
# isn't really needed, but a few (such as Solaris) do have notable leaks
# in the libraries.
MaxRequestsPerChild 25
# Proxy Server directives. Uncomment the following line to
# enable the proxy server:
#ProxyRequests On
# To enable the cache as well, edit and uncomment the following lines:
#CacheRoot /usr/local/etc/httpd/proxy
#CacheSize 5
#CacheGcInterval 4
#CacheMaxExpire 24
#CacheLastModifiedFactor 0.1
#CacheDefaultExpire 1
#NoCache a_domain.com another_domain.edu joes.garage_sale.com
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the VirtualHost command
#Listen 3000
#Listen 12.34.56.78:80
<snip>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980403195217.1028A-400000>
