From nobody@hyperreal.com Wed Apr 9 18:10:26 1997 Received: (from nobody@localhost) by hyperreal.com (8.8.4/8.8.4) id SAA24568; Wed, 9 Apr 1997 18:10:26 -0700 (PDT) Message-Id: <199704100110.SAA24568@hyperreal.com> Date: Wed, 9 Apr 1997 18:10:26 -0700 (PDT) From: John Matheson Reply-To: johnm@abctec.com To: apbugs@hyperreal.com Subject: cgi processes need to be niced. X-Send-Pr-Version: 3.2 >Number: 342 >Category: mod_cgi >Synopsis: cgi processes need to be niced. >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed Apr 9 18:20:02 1997 >Last-Modified: Sat Apr 19 16:07:50 PDT 1997 >Originator: johnm@abctec.com >Organization: >Release: any >Environment: caldera linux >Description: Some of the other Apache users suggested I leave this note. I dont use perl scripts, just compiled C. It is my hope my users can get in and out as quickly as possible. Sometimes, when my CGI is waiting for another resource from another server (geocities for example), the processes persist for a long time and hit the wall. The drive starts spinning around, and it can take 10 or 20 minutes for linux to return a prompt for me to run my httpd process kill routine and restart nice -19 /usr/sbin/httpd. In worse cases I have to do a /sbin/shutdown -r now, which causes me great displeasure. It isnt really a bug report but more of a suggestion, is there a way that you could make it so that all cgi programs are also niced as well? For now it seems that there is no way of doing this. I cant seem to just kludge my cgi to a shell script which nice-19s my program, as it seems to lose all the stdin data from the CGI and dump core on me or cause a server error to occur. by the way, put WRAP="VIRTUAL" in your TEXTAREA tags to eliminate the scroll bar at the bottom.... >How-To-Repeat: well, I don;t really want you trying to crash my guestbook server, but it is at www.abctec.com >Fix: is there a way that you could make it so that all cgi programs are also niced as well%3 >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: dgaudet State-Changed-When: Sat Apr 19 16:07:50 PDT 1997 State-Changed-Why: It sounds like your machine is short of RAM and swapping a lot. The shell command you want is "renice", and the perl/C functions which implement that are called setpriority. Take a peek at the appropriate man pages for more details. Thanks for using Apache! Dean >Unformatted: