Return-Path: Delivered-To: apmail-modperl-cvs-archive@apache.org Received: (qmail 21065 invoked by uid 500); 15 Nov 2001 09:18:21 -0000 Mailing-List: contact modperl-cvs-help@apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@perl.apache.org Delivered-To: mailing list modperl-cvs@apache.org Received: (qmail 21054 invoked by uid 500); 15 Nov 2001 09:18:20 -0000 Delivered-To: apmail-modperl-site-cvs@apache.org Date: 15 Nov 2001 09:04:58 -0000 Message-ID: <20011115090458.31598.qmail@icarus.apache.org> From: stas@apache.org To: modperl-site-cvs@apache.org Subject: cvs commit: modperl-site/guide/code lwp-bench.pl X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N stas 01/11/15 01:04:58 Modified: guide CHANGES advocacy.html browserbugs.html config.html control.html correct_headers.html databases.html dbm.html debug.html download.html frequent.html hardware.html help.html index.html index_long.html install.html intro.html mod_perl_guide.pdf.gz modules.html multiuser.html performance.html perl.html porting.html scenario.html security.html snippets.html start.html strategy.html troubleshooting.html guide/code lwp-bench.pl Log: Nov 15 2001 ver 1.31 * intro.pod: o updated the long due credits section (~200 contributors! in total) * install.pod: o add "When DSO can be Used" (Doug) * modules.pod: o add Module::Use o add Apache::ConfigFile * debug.pod: o noted the fact that the technique of detecting aborted connections doesn't work with mod_proxy. * performance.pod: o removed from the last section a dead link of http://members.nbci.com/Alex_Maranda/gnuintel/GNUintel.htm * snippets.pod: o detecting SSL connection (Vivek Khera, Geoff Young, Issac Goldstand) o Note the Apache::Request->instance class method in addition to the POST2GET example (Robin Bjorn) * porting.pod: o s/headers_out/header_out/ where it was incorrectly used, (Issac Goldstand) o fix the potential bug when using -r $file followed by -M _ and 'do $filename' inbetween, which may call stat() and _ won't include the right stat struct. (Randy Kobes) * troubleshooting.pod: o SegFaults During Startup * help.pod: o add a reference to http://lists.perl.org/ o add references to the new mailing lists * code: o the results in lwp-bench.pl are correctly based on the number of @urls used (Boris Zentner) * strategy.pod: o new section: "Closing Lingering Connections with Lingerd" Revision Changes Path 1.31 +63 -0 modperl-site/guide/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/modperl-site/guide/CHANGES,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- CHANGES 2001/09/02 14:26:57 1.30 +++ CHANGES 2001/11/15 09:04:50 1.31 @@ -2,6 +2,69 @@ ### mod_perl Guide CHANGES file ### ################################### +Nov 15 2001 ver 1.31 + +* intro.pod: + + o updated the long due credits section (~200 contributors! in total) + +* install.pod: + + o add "When DSO can be Used" (Doug) + +* modules.pod: + + o add Module::Use + + o add Apache::ConfigFile + +* debug.pod: + + o noted the fact that the technique of detecting aborted connections + doesn't work with mod_proxy. + +* performance.pod: + + o removed from the last section a dead link of + http://members.nbci.com/Alex_Maranda/gnuintel/GNUintel.htm + +* snippets.pod: + + o detecting SSL connection (Vivek Khera, Geoff Young, Issac Goldstand) + + o Note the Apache::Request->instance class method in addition to the + POST2GET example (Robin Bjorn) + +* porting.pod: + + o s/headers_out/header_out/ where it was incorrectly used, + (Issac Goldstand) + + o fix the potential bug when using -r $file followed by -M _ and 'do + $filename' inbetween, which may call stat() and _ won't include the + right stat struct. (Randy Kobes) + +* troubleshooting.pod: + + o SegFaults During Startup + +* help.pod: + + o add a reference to http://lists.perl.org/ + + o add references to the new mailing lists + +* code: + + o the results in lwp-bench.pl are correctly based on the number of + @urls used (Boris Zentner) + +* strategy.pod: + + o new section: "Closing Lingering Connections with Lingerd" + + + 09.02.2001 ver 1.30 * snippets.pod 1.13 +1 -1 modperl-site/guide/advocacy.html Index: advocacy.html =================================================================== RCS file: /home/cvs/modperl-site/guide/advocacy.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- advocacy.html 2001/09/02 14:26:57 1.12 +++ advocacy.html 2001/11/15 09:04:50 1.13 @@ -272,7 +272,7 @@ Written by Stas Bekman.
Last Modified at 05/05/2001 +href="help.html#Contacting_me">Stas Bekman.
Last Modified at 09/14/2001

1.15 +1 -1 modperl-site/guide/browserbugs.html Index: browserbugs.html =================================================================== RCS file: /home/cvs/modperl-site/guide/browserbugs.html,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- browserbugs.html 2001/04/27 16:57:09 1.14 +++ browserbugs.html 2001/11/15 09:04:50 1.15 @@ -157,7 +157,7 @@ Written by Stas Bekman.
Last Modified at 06/22/2000 +href="help.html#Contacting_me">Stas Bekman.
Last Modified at 09/14/2001

1.33 +4 -1 modperl-site/guide/config.html Index: config.html =================================================================== RCS file: /home/cvs/modperl-site/guide/config.html,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- config.html 2001/09/02 14:26:57 1.32 +++ config.html 2001/11/15 09:04:50 1.33 @@ -596,6 +596,9 @@ virtual host configurations to override the main server configuration.

+Later sections override earlier ones. + +

[ TOC ]


Sub-Grouping of <Location>, <Directory> and <Files> Sections

@@ -4293,7 +4296,7 @@ Written by Stas Bekman.
Last Modified at 07/10/2001 +href="help.html#Contacting_me">Stas Bekman.
Last Modified at 10/28/2001

1.33 +1 -1 modperl-site/guide/control.html Index: control.html =================================================================== RCS file: /home/cvs/modperl-site/guide/control.html,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- control.html 2001/09/02 14:26:57 1.32 +++ control.html 2001/11/15 09:04:50 1.33 @@ -2837,7 +2837,7 @@ Written by Stas Bekman.
Last Modified at 05/05/2001 +href="help.html#Contacting_me">Stas Bekman.
Last Modified at 09/14/2001

1.16 +1 -1 modperl-site/guide/correct_headers.html Index: correct_headers.html =================================================================== RCS file: /home/cvs/modperl-site/guide/correct_headers.html,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- correct_headers.html 2001/09/02 14:26:57 1.15 +++ correct_headers.html 2001/11/15 09:04:50 1.16 @@ -292,7 +292,7 @@ use Date::Parse; # Date::Parse parses RCS format, Apache::Util::parsedate doesn't $Mtime ||= - Date::Parse::str2time(substr q$Date: 2001/09/02 14:26:57 $, 6); + Date::Parse::str2time(substr q$Date: 2001/11/15 09:04:50 $, 6); $r->set_last_modified($Mtime); @@ -1290,7 +1290,7 @@ Written by Stas Bekman.
Last Modified at 07/03/2001 +href="help.html#Contacting_me">Stas Bekman.
Last Modified at 09/14/2001

1.20 +1 -1 modperl-site/guide/databases.html Index: databases.html =================================================================== RCS file: /home/cvs/modperl-site/guide/databases.html,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- databases.html 2001/09/02 14:26:57 1.19 +++ databases.html 2001/11/15 09:04:50 1.20 @@ -1025,7 +1025,7 @@ Written by Stas Bekman.
Last Modified at 05/05/2001 +href="help.html#Contacting_me">Stas Bekman.
Last Modified at 09/14/2001

1.20 +1 -1 modperl-site/guide/dbm.html Index: dbm.html =================================================================== RCS file: /home/cvs/modperl-site/guide/dbm.html,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- dbm.html 2001/09/02 14:26:58 1.19 +++ dbm.html 2001/11/15 09:04:50 1.20 @@ -753,7 +753,7 @@ Written by Stas Bekman.
Last Modified at 05/05/2001 +href="help.html#Contacting_me">Stas Bekman.
Last Modified at 09/14/2001

1.30 +7 -1 modperl-site/guide/debug.html Index: debug.html =================================================================== RCS file: /home/cvs/modperl-site/guide/debug.html,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- debug.html 2001/09/02 14:26:58 1.29 +++ debug.html 2001/11/15 09:04:50 1.30 @@ -945,6 +945,12 @@ attempt to read from or write to connection is made.

+Unfortunately the detection technique we are going to present doesn't work +if the connection to the back-end mod_perl server is coming from the +front-end mod_proxy, as the latter doesn't break the connection to the +back-end when user has aborted the connection. + +

If the reading of the request's data is completed and the code does processing without writing anything back to the client the broken connection won't be noticed. When an attempt is made to send at least one @@ -7196,7 +7202,7 @@ Written by Stas Bekman.
Last Modified at 04/28/2001 +href="help.html#Contacting_me">Stas Bekman.
Last Modified at 11/06/2001

1.20 +1 -1 modperl-site/guide/download.html Index: download.html =================================================================== RCS file: /home/cvs/modperl-site/guide/download.html,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- download.html 2001/09/02 14:26:58 1.19 +++ download.html 2001/11/15 09:04:50 1.20 @@ -450,7 +450,7 @@ Written by Stas Bekman.
Last Modified at 07/18/2001 +href="help.html#Contacting_me">Stas Bekman.
Last Modified at 09/14/2001

1.17 +1 -1 modperl-site/guide/frequent.html Index: frequent.html =================================================================== RCS file: /home/cvs/modperl-site/guide/frequent.html,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- frequent.html 2001/01/11 13:48:16 1.16 +++ frequent.html 2001/11/15 09:04:50 1.17 @@ -154,7 +154,7 @@ Written by Stas Bekman.
Last Modified at 05/27/2000 +href="help.html#Contacting_me">Stas Bekman.
Last Modified at 09/14/2001

1.14 +1 -1 modperl-site/guide/hardware.html Index: hardware.html =================================================================== RCS file: /home/cvs/modperl-site/guide/hardware.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- hardware.html 2001/09/02 14:26:58 1.13 +++ hardware.html 2001/11/15 09:04:50 1.14 @@ -734,7 +734,7 @@ Written by Stas Bekman.
Last Modified at 05/05/2001 +href="help.html#Contacting_me">Stas Bekman.
Last Modified at 09/14/2001

1.32 +100 -6 modperl-site/guide/help.html Index: help.html =================================================================== RCS file: /home/cvs/modperl-site/guide/help.html,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- help.html 2001/10/16 16:08:35 1.31 +++ help.html 2001/11/15 09:04:50 1.32 @@ -272,14 +272,15 @@ .

-A searchable mod_perl mailing list archive is available at http://mathforum.org/epigone/modperl -. Thanks to Ken Williams for this. +Searchable mailing list archives are available: +

  • When One Machine is not Enough for RDBMS Database and mod_perl @@ -885,6 +886,67 @@

    [ TOC ]


    +

    Closing Lingering Connections with Lingerd

    +

    +Because of some technical complications in TCP/IP, at the end of each +client connection, it is not enough for Apache to close the socket and +forget about it; instead, it needs to spend about one second +lingering on the client. (More details can be found at http://httpd.apache.org/docs/misc/fin_wait_2.html) + + +

    +Lingerd is a daemon (service) designed to take over the job of properly +closing network connections from an http server like Apache and immediately +freeing it to handle a new connection. + +

    +lingerd can only do an effective job if HTTP Keep-Alives are turned off; since Keep-Alives are useful for images, the recommended setup is to have lingerd serving mod_perl enabled Apache and plain Apache for images and other +static objects. + +

    +With a lingerd setup, you don't have the proxy, so the buffering chain we have presented +before for the proxy setup is much shorter here: + +

    +FIGURE: + +

    + + + + + + + + + +
    +   + +
     |   Apache     Kernel   |TCP/IP  `o'
      + | [mod_perl]=>[sendbuf] |======> /|\
      + |                       |        / \
    +
    +

    +Hence in this setup it becomes more important to have a big enough kernel +send buffer. + +

    +With lingerd, a big enough kernel send buffer, and keep-alives off, the job +of spoonfeeding the data to a slow client is done by the OS kernel in the +background. As a result, lingerd makes it possible to serve the same load using considerably fewer Apache +processes. This translates into a reduced load on the server. It can be +used as an alternative to the proxy setups we have seen so far. + +

    +For more information about lingerd see: http://www.iagora.com/about/software/lingerd/ + + +

    +[ TOC ] +


    When One Machine is not Enough for RDBMS Database and mod_perl

    Imagine a scenario where you start your business as a small service @@ -1550,7 +1612,7 @@ Written by Stas Bekman.
    Last Modified at 07/25/2001 +href="help.html#Contacting_me">Stas Bekman.
    Last Modified at 09/19/2001

    1.13 +15 -1 modperl-site/guide/troubleshooting.html Index: troubleshooting.html =================================================================== RCS file: /home/cvs/modperl-site/guide/troubleshooting.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- troubleshooting.html 2001/09/02 14:27:01 1.12 +++ troubleshooting.html 2001/11/15 09:04:55 1.13 @@ -39,6 +39,7 @@

  • Configuration and Startup
      +
    • SegFaults During Startup
    • libexec/libperl.so: open failed: No such file or directory
    • install_driver(Oracle) failed: Can't load '.../DBD/Oracle/Oracle.so' for module DBD::Oracle
    • Invalid command 'PerlHandler'... @@ -169,6 +170,19 @@

      [ TOC ]


      +

      SegFaults During Startup

      +

      +You have to build mod_perl with the same compiler as Perl was built with. +Otherwise you may see segmentation faults and other weird things happen. + +

      +However if this is not the situation and you still experience segmentation +faults, please refer to the SUPPORT file in the mod_perl source distribution and post the trace from the core +file as explained there. + +

      +[ TOC ] +


      libexec/libperl.so: open failed: No such file or directory

      If when you run the server you get the following error: @@ -1387,7 +1401,7 @@ Written by Stas Bekman.
      Last Modified at 05/07/2001 +href="help.html#Contacting_me">Stas Bekman.
      Last Modified at 10/05/2001

      1.3 +10 -10 modperl-site/guide/code/lwp-bench.pl Index: lwp-bench.pl =================================================================== RCS file: /home/cvs/modperl-site/guide/code/lwp-bench.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- lwp-bench.pl 2001/09/02 14:27:03 1.2 +++ lwp-bench.pl 2001/11/15 09:04:57 1.3 @@ -8,8 +8,8 @@ # Configuration ### -my $nof_parallel_connections = 10; -my $nof_requests_total = 100; +my $nof_parallel_connections = 10; +my $nof_requests_total = 100; my $timeout = 10; my @urls = ( 'http://www.example.com:81/perl/faq_manager/faq_manager.pl', @@ -100,7 +100,7 @@ } ### -# Format errors if any from %errors +# Format errors if any from %errors ### my $errors = join(',', map "$_ ($errors{$_})", keys %errors); $errors = "NONE" unless $errors; @@ -112,17 +112,17 @@ #@urls = map {($_,".")} @urls; my @P = ( "URL(s)" => join("\n\t\t ", @urls), - "Total Requests" => "$nof_requests_total", + "Total Requests" => $nof_requests_total * @urls, "Parallel Agents" => $nof_parallel_connections, "Succeeded" => sprintf("$succeeded (%.2f%%)\n", - $succeeded * 100 / ($nof_requests_total * @urls) ), + $succeeded * 100 / ( $nof_requests_total * @urls ) ), "Errors" => $errors, "Total Time" => sprintf("%.2f secs\n", $total_time), - "Throughput" => sprintf("%.2f Requests/sec\n", - $nof_requests_total / $total_time), - "Latency" => sprintf("%.2f secs/Request", - ($ua->get_latency_total() || 0) / - $nof_requests_total), + "Throughput" => sprintf("%.2f Requests/sec\n", + ( $nof_requests_total * @urls ) / $total_time), + "Latency" => sprintf("%.2f secs/Request", + ($ua->get_latency_total() || 0) / + ( $nof_requests_total * @urls ) ), ); my ($left, $right);