From owner-freebsd-questions Mon Jun 8 16:13:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA02454 for freebsd-questions-outgoing; Mon, 8 Jun 1998 16:13:44 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from db1.icorp.net ([204.107.221.100]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA02387 for ; Mon, 8 Jun 1998 16:13:21 -0700 (PDT) (envelope-from mlistbsd@icorp.net) Received: from m (p319.accesscom.net [204.181.189.19]) by db1.icorp.net (8.8.6/8.8.6) with SMTP id XAA10699 for ; Mon, 8 Jun 1998 23:13:17 GMT Message-Id: <3.0.1.32.19980608181254.006e0d14@icorp.net> X-Sender: mlistbsd@icorp.net X-Mailer: Windows Eudora Pro Version 3.0.1 (32) Date: Mon, 08 Jun 1998 18:12:54 -0500 To: freebsd-questions@FreeBSD.ORG From: MP Subject: Apache/ssl: couldn't spawn child process Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I recently began testing Apache 1.26/SSL under load and started seeing this in the ssl error log files (of course, after my telephone rang ) [Mon Jun 8 16:41:55 1998] access to /cgi-bin/myscript failed for 168-64-223.ipt.aol. com, reason: couldn't spawn child process fork: Resource temporarily unavailable I have "maxusers=256" in my kernel configuration (2.2.6). I was running into a problem with Apache/ssl - it seems as if the server cannot fork additional processes - so I assume this is an OS problem and not an Apache problem. Here are my relevant settings in Apache's config: Timeout 300 MinSpareServers 4 MaxSpareServers 12 StartServers 2 MaxClients 200 #MaxRequestsPerChild 30 #MaxRequestsPerChild 0 - default I was playing around with various settings - I opened up two browser windows and tried to initiate simultaneous SSL connections and depending upon my config, one would usually fail and I would not necessarily see adequate processes listed in my ps list. I think I've hacked it to be less problemmatic by simply increasing the number of max & min spare servers but this is no solution - as it will likely crash when that small limit is tapped. I have not run into this same problem with Apache 1.26 (non-ssl) My top typically looks like this: last pid: 29881; load averages: 0.03, 0.08, 0.08 18:05:22 66 processes: 7 running, 59 sleeping CPU states: 0.3% user, 0.0% nice, 0.7% system, 0.7% interrupt, 98.3% idle Mem: 76M Active, 4744K Inact, 22M Wired, 19M Cache, 8348K Buf, 3272K Free Swap: 266M Total, 3720K Used, 262M Free, 1% Inuse This starts my regular Apache: #!/bin/csh set PATH=/bin:/usr/bin:/sbin:/usr/sbin umask 0002 cd /www/apache ./httpd -d /www/apache/ -f conf/httpd.conf This starts Apache/SSL: #!/bin/bash umask 0002 ulimit cd /www/apache ./m.httpsd.126 -d /www/apache/ -f ssl_conf/httpd.conf I HAD apache using csh and a similar config, but have been experimenting with the 'ulimit' command an an alternate shell (bash) to start the SSL server to see if this helps. I suspect the operating environment of the web server is the culprit. I've seen discussions relating to changing /etc/login.conf - but I don't know exactly which settings to tweak or if this matters. I've made some changes - but don't know if I've addressed the problem - I have a funny feeling it will resurface when a certain level of activity hits. My questions are: 1. What is the recommended shell/commands/structure to launch Apache/Apache-ssl? 2. How can I avoid running into "couldn't spawn child process" error? I don't think it's a kernel issue so what are my options? Thanks! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message