httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13120] New: - CGI procs defunctioning
Date Sun, 29 Sep 2002 15:39:28 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13120>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13120

CGI procs defunctioning

           Summary: CGI procs defunctioning
           Product: Apache httpd-1.3
           Version: 1.3.26
          Platform: PC
               URL: N/A
        OS/Version: Linux
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: mod_cgi
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: haj@zhat.dk


I wrote some CGI programs in C++ and compiled with g++ on Linux RedHat 7.3 
standard configuration. I have installed Apache from source including PHP4 
support as static module.

I noticed that all of my CGI programs produced output very slowly. I made a 
simple "Hello world!" test CGI to see if this is a general problem. It is. All 
the CGI-processes appear as <defunct> in top. 

Run in the console, my programs execute extremely fast.

I solved my problem making non-parsed header versions of my CGI apps. They 
execute fast enough, but still appear as defunct in the process list.

Here is my test app:

#include <stdio.h>

int main(void)
{
    puts("Content-Type: text/html\n");
    puts("Hello world!");
    return 0;
}

compiled using command: gcc hello.c -o hello
Invoked through URL: http://server_ip/cgi-bin/hello it sometimes takes up to 5 
seconds when refreshed. The first request is handled quickly though.

here's my httpd.conf:

ServerType standalone
ServerRoot "/usr/local/apache"

PidFile /usr/local/apache/logs/httpd.pid
ScoreBoardFile /usr/local/apache/logs/httpd.scoreboard

Timeout 60
KeepAlive On
MaxKeepAliveRequests 0
KeepAliveTimeout 30

MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 256
MaxRequestsPerChild 0

Port 80
User nobody
Group nobody
ServerAdmin haj@zhat.dk
UseCanonicalName off
ServerName 10.2.18.63
DocumentRoot "/home/zhat/www"

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

ScriptAlias /cgi-bin/ /home/zhat/www/cgi-bin/

<Directory /home/zhat/cgi-bin/>
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
    
<Directory "/home/zhat/www">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_dir.c>
    DirectoryIndex index.php index.html
</IfModule>

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>
<Files ~ "^\.java">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>

DefaultType text/plain
HostnameLookups Off

ErrorLog /usr/local/apache/logs/error_log
LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" 
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

CustomLog /usr/local/apache/logs/access_log common

ServerSignature Off

TypesConfig /usr/local/apache/conf/mime.types
AddType application/x-httpd-php .php

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message