if one reuqest is hang, others are slowed down

Silent <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel,gmane.spam.detected
Message-ID <[email protected]>
Hi,
this is my first email in this list !

I have a question:

a fastcgi script may be accessed by many user, if one user's request is
slowed down,
other user's request will also be slowdown ?

# script:  (if path_info =~ wait, it will slowdown)


#!/usr/bin/perl -w
use FCGI;
my $req = FCGI::Request();
while ($req->Accept() >= 0) {
        my $path = $ENV{'PATH_INFO'};
        $|=1;
    print "Content-Type:text/html\n\n";
    print "Your are ", $count, " guest<br>\n";
        $count++;

        print "<br>\n";

        my $k;
        my $v;
        while (($k, $v) = each %ENV) {
                if ($path=~/wait/) {
                        warn "$path sleeping";
                        sleep 1;
                }
                print "$k\t=>$v<br>\n";
        }
}

#### apache2 config

FastCgiIpcDir /tmp
AddHandler fastcgi-script .fcgi .fpl
FastCGIConfig -autoUpdate -idle-timeout 120 -killInterval 3600
-maxClassProcesses 6 -maxProcesses 15  # I do not know this yet

Alias   /fcgi   "/var/www/fcgi/"
<Directory "/var/www/fcgi/">
        AllowOverride None
        Options ExecCGI
        Allow from all

</Directory>

### test result:

[root@TD18 ~]#ab -n 30 -c 10
http://192.168.1.200/fcgi/slow2.fcgi/wait>>/dev/null &
[1] 19033
[root@TD18 ~]#ab -n 30 -c 10 http://192.168.1.200/fcgi/slow2.fcgi/no
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.200 (be patient).....done


Server Software:        Apache/2.2.3
Server Hostname:        192.168.1.200
Server Port:            80

Document Path:          /fcgi/slow2.fcgi/no
Document Length:        922 bytes

Concurrency Level:      10
Time taken for tests:   66.891503 seconds
Complete requests:      30
Failed requests:        0
Write errors:           0
Total transferred:      32040 bytes
HTML transferred:       27660 bytes
Requests per second:    0.45 [#/sec] (mean)         ##############   it is
very slow !!!!
Time per request:       22297.167 [ms] (mean)
Time per request:       2229.717 [ms] (mean, across all concurrent requests)
Transfer rate:          0.46 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    2   2.2      3       7
Processing: 16594 22293 4098.3  25084   25203
Waiting:    16591 22291 4098.2  25083   25201
Total:      16597 22296 4098.4  25086   25206

Percentage of the requests served within a certain time (ms)
  50%  25086
  66%  25087
  75%  25204
  80%  25205
  90%  25206
  95%  25206
  98%  25206
  99%  25206
 100%  25206 (longest request)
[root@TD18 ~]#
[root@TD18 ~]#
[root@TD18 ~]#jobs
[1]+  Running                 ab -n 30 -c 10
http://192.168.1.200/fcgi/slow2.fcgi/wait >>/dev/null &
[root@TD18 ~]#



any suggestion ? thanks!

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.