From davidb@pins.net Tue Aug 5 14:40:34 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.37]) by spam.chelsea.net (Postfix) with ESMTP id DA7571E1F5 for ; Tue, 5 Aug 2008 14:40:34 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on strohs.chelsea.net X-Spam-Status: No, score=-8.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DOC_MAIL_LIST_BODY_DB,GOOGLE_PORN_LONGER,SUBJECT_3_WORDS autolearn=no version=3.2.4 X-Spam-Level: Received: from rarevos.pins.net (rarevos.pins.net [209.212.65.43]) by smtp.chelsea.net (Postfix) with ESMTP id 6766C4810 for ; Tue, 5 Aug 2008 14:40:21 -0400 (EDT) Date: Tue, 5 Aug 2008 13:15:48 -0400 (EDT) From: David Birnbaum X-X-Sender: davidb@rarevos.pins.net To: fastcgi-announce@mailman.fastcgi.com X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed ReSent-Date: Tue, 5 Aug 2008 14:41:10 -0400 (EDT) ReSent-From: David Birnbaum ReSent-To: fastcgi-developers@mailman.fastcgi.com ReSent-Subject: Mailing List Repair ReSent-Message-ID: ReSent-User-Agent: Alpine 1.10 (GSO 962 2008-03-14) Subject: [FASTCGI] Mailing List Repair X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2008 18:40:37 -0000 Folks, The FastCGI mailing lists have been offline for a while due to a mail server crash. Mailman was kinda low on the list to get repaired, but it now has been. I apologize for the inconvience. Cheers, David. From davidb@pins.net Tue Aug 5 14:49:29 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.61]) by spam.chelsea.net (Postfix) with ESMTP id 907CA6D7E6 for ; Tue, 5 Aug 2008 14:49:29 -0400 (EDT) Received: from rarevos.pins.net (rarevos.pins.net [209.212.65.43]) by smtp.chelsea.net (Postfix) with ESMTP id 934E941C3 for ; Tue, 5 Aug 2008 14:49:18 -0400 (EDT) Date: Tue, 5 Aug 2008 14:50:22 -0400 (EDT) From: David Birnbaum To: fastcgi-developers@mailman.fastcgi.com X-SMTP-Filter: YES Message-ID: User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Subject: [FASTCGI] List Repair X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2008 18:49:32 -0000 Folks, The FastCGI lists have been down for a while due to a mail problem. I apologize for the length of time it's taken to get them back up. They should be functional again, although you may have to reset your password or other settings. Cheers, David. From tom@streamsense.net Tue Aug 5 14:56:32 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.36]) by spam.chelsea.net (Postfix) with ESMTP id 243376D7E6 for ; Tue, 5 Aug 2008 14:56:32 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id C243F5F8C for ; Tue, 5 Aug 2008 14:56:21 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.24] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 272931257 for fastcgi-developers@fastcgi.com; Tue, 05 Aug 2008 14:56:23 -0400 Received: from localhost.localdomain (unknown [209.212.65.37]) by spam.chelsea.net (Postfix) with ESMTP id 702851E1FA for ; Tue, 5 Aug 2008 14:56:31 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on strohs.chelsea.net X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00, DOC_MAIL_LIST_BODY_DB, GOOGLE_PORN_LONGER, PINS_GAMBLE_BODY, SPF_HELO_PASS autolearn=ham version=3.2.4 X-Spam-Level: Received: from moutng.kundenserver.de ([212.227.126.177] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 272931263 for fastcgi-developers@fastcgi.com; Tue, 05 Aug 2008 14:56:15 -0400 Received-SPF: pass receiver=real.pins.net; client-ip=212.227.126.177; envelope-from=tom@streamsense.net Received: from [192.168.1.64] (78-86-189-130.zone2.bethere.co.uk [78.86.189.130]) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis) id 0ML21M-1KQRhk2CBT-0000YB; Tue, 05 Aug 2008 20:56:21 +0200 X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <4898A24B.3030408@streamsense.net> Date: Tue, 05 Aug 2008 19:56:11 +0100 From: Thomas Grimshaw User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: fastcgi-developers@fastcgi.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+A1845HA+FkqvIY1gyMMv3avS2yax7VyXaoUg SpOgOwAJYmhUBQteF8+aBakIBFFhJOSvfduHUuJWa0AaSU5hZD Rt+EKGcUMvmDwsZRW3Lsw5ci3gOYBnh X-CGP-External-Filter: YES Subject: [FASTCGI] FCGI_LISTENSOCK_FILENO X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2008 18:56:37 -0000 Since the list is working again now :) =========== Hi all, I'm currently in the process of expanding my webserver to support FastCGI. However, i'm having a little trouble understanding one crucial part of the specification. I may be lacking some fundamental knowledge here, so, please bear with me! I need to create a socket in my webserver application before launching the fastCGI app. So, I do this, and I have the socket handle. The specification reads "The Web server leaves a single file descriptor, FCGI_LISTENSOCK_FILENO, open when the application begins execution. This descriptor refers to a listening socket created by the Web server." How does the FastCGI application get my socket handle? I see from the spec that FCGI_LISTENSOCK_FILENO is a constant of 0. And a file descriptor of 0 refers to STDIN, does it not? Is this a roundabout way of saying that I need to use STDIN to communicate? I'd appreciate any help you guys can give. Many thanks, Tom From rainer.jung@kippdata.de Tue Aug 5 18:40:02 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.30]) by spam.chelsea.net (Postfix) with ESMTP id DB56B6D805 for ; Tue, 5 Aug 2008 18:40:02 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id 062DF5E18 for ; Tue, 5 Aug 2008 18:39:51 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.24] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 272947511 for fastcgi-developers@fastcgi.com; Tue, 05 Aug 2008 18:39:53 -0400 Received: from localhost.localdomain (unknown [209.212.65.37]) by spam.chelsea.net (Postfix) with ESMTP id 203FA1E252 for ; Tue, 5 Aug 2008 18:40:01 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on strohs.chelsea.net X-Spam-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00, GOOGLE_PORN_LONGER,PINS_GAMBLE_BODY,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.4 X-Spam-Level: Received: from mailserver.kippdata.de ([195.227.30.149] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 272947485 for fastcgi-developers@fastcgi.com; Tue, 05 Aug 2008 18:39:43 -0400 Received-SPF: none receiver=real.pins.net; client-ip=195.227.30.149; envelope-from=rainer.jung@kippdata.de Received: from [192.168.2.115] ([192.168.2.115]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id m75MdmI5014383 for ; Wed, 6 Aug 2008 00:39:49 +0200 (CEST) X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <4898D689.10803@kippdata.de> Date: Wed, 06 Aug 2008 00:39:05 +0200 From: Rainer Jung User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: fastcgi-developers@fastcgi.com Content-Type: multipart/mixed; boundary="------------090805030501020607010207" X-CGP-External-Filter: YES Subject: [FASTCGI] [Patch] Improve handling of interrupted system calls X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2008 22:40:06 -0000 This is a multi-part message in MIME format. --------------090805030501020607010207 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello, during stress tests we realized, that mod_fastcgi aborts requests in some cases, where the root cause is an interrupted system call. After adding a retry functionality, we noticed no more of these errors and the responses were delivered with the correct content. So I attach the patch we used. Some comments: There are two situations, that are handled by the patch: A) After select() in socket_io() indicates, that the response can be read, but the following readv() in fcgi_buf_socket_recv() returns with EAGAIN. Normally this should not happen, but it isn't forbidden and at least on AIX 5.2 we noticed exactly this behaviour. It only showed up sporadically, but when it happens, because mod_fastcgi aborts the request we get status codes 500. B) select() in socket_io() can return with EINTR. We implemented a retry loop, which sleep 1 second and loops max 10 times in order to prevent a non terminating loop. We also noticed this behaviour on AIX 5.2 under stress (sporadically). The loop never ran more than twice. The one second sleep might not be ideal, but since the problem only happens very rarely, it looked safer, than a shorter sleep. Thanks for producing mod_fastcgi! Regards, Rainer --------------090805030501020607010207 Content-Type: text/x-patch; name="mod_fastcgi.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mod_fastcgi.c.patch" --- mod_fastcgi.c.orig 2008-01-07 11:58:32.000000000 +0100 +++ mod_fastcgi.c 2008-06-23 13:35:24.000000000 +0200 @@ -1972,6 +1972,7 @@ static int socket_io(fcgi_request * const fr) { + int select_count; enum { STATE_SOCKET_NONE, @@ -2193,7 +2194,18 @@ } /* wait on the socket */ - select_status = ap_select(nfds, &read_set, &write_set, NULL, &timeout); + select_count = 0; + do { + if (select_count) { + sleep(1); + ap_log_rerror(FCGI_LOG_INFO_NOERRNO, r, + "FastCGI: select returned %d, retry number %d", + select_status, select_count); + } + select_status = ap_select(nfds, &read_set, &write_set, NULL, &timeout); + select_count++; + } while (select_status < 0 && select_count <= FCGI_MAX_SELECT_RETRIES && + errno == EINTR); if (select_status < 0) { @@ -2264,9 +2276,15 @@ if (rv < 0) { - ap_log_rerror(FCGI_LOG_ERR, r, "FastCGI: comm with server " - "\"%s\" aborted: read failed", fr->fs_path); - state = STATE_ERROR; + if (errno == EAGAIN) { + ap_log_rerror(FCGI_LOG_INFO_NOERRNO, r, "FastCGI: comm with server " + "\"%s\" interrupted: read will be retried in 1 second", fr->fs_path); + sleep(1); + } else { + ap_log_rerror(FCGI_LOG_ERR, r, "FastCGI: comm with server " + "\"%s\" aborted: read failed", fr->fs_path); + state = STATE_ERROR; + } break; } --------------090805030501020607010207 Content-Type: text/x-patch; name="mod_fastcgi.h.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mod_fastcgi.h.patch" --- mod_fastcgi.h.orig 2008-01-07 11:58:32.000000000 +0100 +++ mod_fastcgi.h 2008-06-23 13:11:18.000000000 +0200 @@ -54,6 +54,7 @@ #define FCGI_MIN_EXEC_RETRY_DELAY 10 /* minimum number of seconds to wait before restarting */ #define MAX_INIT_ENV_VARS 64 /* max # of -initial-env options */ +#define FCGI_MAX_SELECT_RETRIES 10 /* max # of retries after select returns EINTR */ /* max number of chars in a line of stderr we can handle from a FastCGI Server */ #define FCGI_SERVER_MAX_STDERR_LINE_LEN 1023 --------------090805030501020607010207-- From rainer.jung@kippdata.de Tue Aug 5 18:46:07 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.61]) by spam.chelsea.net (Postfix) with ESMTP id 478D36D805 for ; Tue, 5 Aug 2008 18:46:07 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id E98884BC6 for ; Tue, 5 Aug 2008 18:45:55 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.13] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 272948141 for fastcgi-developers@fastcgi.com; Tue, 05 Aug 2008 18:45:56 -0400 Received: from localhost.localdomain (unknown [209.212.65.61]) by spam.chelsea.net (Postfix) with ESMTP id 0B4606D805 for ; Tue, 5 Aug 2008 18:46:05 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on hickory.chelsea.net X-Spam-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00,FOUND_OTB, PINS_GAMBLE_BODY,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.4 X-Spam-Level: Received: from mailserver.kippdata.de ([195.227.30.149] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 272948129 for fastcgi-developers@fastcgi.com; Tue, 05 Aug 2008 18:45:51 -0400 Received-SPF: none receiver=real.pins.net; client-ip=195.227.30.149; envelope-from=rainer.jung@kippdata.de Received: from [192.168.2.115] ([192.168.2.115]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id m75Mjw9V015050 for ; Wed, 6 Aug 2008 00:45:59 +0200 (CEST) X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <4898D7FB.4030007@kippdata.de> Date: Wed, 06 Aug 2008 00:45:15 +0200 From: Rainer Jung User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: fastcgi-developers@fastcgi.com References: <4898D689.10803@kippdata.de> In-Reply-To: <4898D689.10803@kippdata.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-CGP-External-Filter: YES Subject: Re: [FASTCGI] [Patch] Improve handling of interrupted system calls X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2008 22:46:10 -0000 Since the attachments were scrubbed in the web archive display, here's a download link to the two files: http://people.apache.org/~rjung/mod_fastcgi/patches/interrupted_syscall/ From davidb@pins.net Tue Aug 5 20:59:05 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.16]) by spam.chelsea.net (Postfix) with ESMTP id 02C486D80C for ; Tue, 5 Aug 2008 20:59:05 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id 7190D5099 for ; Tue, 5 Aug 2008 20:58:54 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.13] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 272955063 for fastcgi-developers@fastcgi.com; Tue, 05 Aug 2008 20:58:56 -0400 Received: from localhost.localdomain (unknown [209.212.65.16]) by spam.chelsea.net (Postfix) with ESMTP id 44DDD6D80C for ; Tue, 5 Aug 2008 20:59:04 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on becks.chelsea.net X-Spam-Status: No, score=-11.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DOC_MAIL_LIST_BODY_DB, GOOGLE_PORN_LONGER, HTML_MESSAGE, PINS_GAMBLE_BODY, SMTP_AUTH_PINS autolearn=ham version=3.2.4 X-Spam-Level: Received: from [209.212.65.29] (account davidb@pins.net HELO [10.5.3.254]) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTPSA id 272955074; Tue, 05 Aug 2008 20:58:49 -0400 X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <4898F74E.2070300@pins.net> Date: Tue, 05 Aug 2008 20:58:54 -0400 From: David Birnbaum User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Thomas Grimshaw References: <4898A24B.3030408@streamsense.net> In-Reply-To: <4898A24B.3030408@streamsense.net> Content-Type: multipart/alternative; boundary="------------020704080408030808030704" X-CGP-External-Filter: YES Cc: fastcgi-developers@fastcgi.com Subject: Re: [FASTCGI] FCGI_LISTENSOCK_FILENO X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2008 00:59:11 -0000 This is a multi-part message in MIME format. --------------020704080408030808030704 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Tom, If the webserver forks the application, it leaves FD0, and STDERR, STDIN, and STDOUT are mutiplexed over it using the FastCGI protocol. If it's a socket connect, it's basically the same thing - you'll to an accept(), and when you get the FD, use the libraries to send/receive data on the socked. David. ------------------------------------------------------------------------ Thomas Grimshaw wrote: > Since the list is working again now :) > > =========== > > > Hi all, > > I'm currently in the process of expanding my webserver to support > FastCGI. However, i'm having a little trouble understanding one > crucial part of the specification. > > I may be lacking some fundamental knowledge here, so, please bear with > me! > > I need to create a socket in my webserver application before launching > the fastCGI app. So, I do this, and I have the socket handle. > > The specification reads "The Web server leaves a single file > descriptor, FCGI_LISTENSOCK_FILENO, open when the application begins > execution. This descriptor refers to a listening socket created by the > Web server." > How does the FastCGI application get my socket handle? I see from the > spec that FCGI_LISTENSOCK_FILENO is a constant of 0. And a file > descriptor of 0 refers to STDIN, does it not? Is this a roundabout way > of saying that I need to use STDIN to communicate? > > I'd appreciate any help you guys can give. > > Many thanks, > > Tom > > > > _______________________________________________ > FastCGI-developers mailing list > FastCGI-developers@mailman.fastcgi.com > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers --------------020704080408030808030704 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Tom,

If the webserver forks the application, it leaves FD0, and STDERR, STDIN, and STDOUT are mutiplexed over it using the FastCGI protocol.

If it's a socket connect, it's basically the same thing - you'll to an accept(), and when you get the FD, use the libraries to send/receive data on the socked.

David.



Thomas Grimshaw wrote:
Since the list is working again now :)

===========


Hi all,

I'm currently in the process of expanding my webserver to support FastCGI. However, i'm having a little trouble understanding one crucial part of the specification.

I may be lacking some fundamental knowledge here, so, please bear with me!

I need to create a socket in my webserver application before launching the fastCGI app. So, I do this, and I have the socket handle.

The specification reads "The Web server leaves a single file descriptor, FCGI_LISTENSOCK_FILENO, open when the application begins execution. This descriptor refers to a listening socket created by the Web server."
How does the FastCGI application get my socket handle?  I see from the spec that FCGI_LISTENSOCK_FILENO is a constant of 0.  And a file descriptor of 0 refers to STDIN, does it not? Is this a roundabout way of saying that I need to use STDIN to communicate?

I'd appreciate any help you guys can give.

Many thanks,

Tom



_______________________________________________
FastCGI-developers mailing list
FastCGI-developers@mailman.fastcgi.com
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
--------------020704080408030808030704-- From cdp_xe@gmx.net Wed Aug 6 04:13:30 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.36]) by spam.chelsea.net (Postfix) with ESMTP id E2E431E2C0 for ; Wed, 6 Aug 2008 04:13:30 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id 633D04F90 for ; Wed, 6 Aug 2008 04:13:17 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.13] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 272969965 for fastcgi-developers@fastcgi.com; Wed, 06 Aug 2008 04:13:19 -0400 Received: from localhost.localdomain (unknown [209.212.65.61]) by spam.chelsea.net (Postfix) with ESMTP id 197546D82C for ; Wed, 6 Aug 2008 04:13:27 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on hickory.chelsea.net X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DOC_MAIL_LIST_BODY_DB,GOOGLE_PORN_LONGER autolearn=ham version=3.2.4 X-Spam-Level: Received: from mail.gmx.net ([213.165.64.20] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with SMTP id 272969953 for fastcgi-developers@fastcgi.com; Wed, 06 Aug 2008 04:13:14 -0400 Received-SPF: pass receiver=real.pins.net; client-ip=213.165.64.20; envelope-from=cdp_xe@gmx.net Received: (qmail invoked by alias); 06 Aug 2008 08:13:21 -0000 Received: from pD9EE1390.dip.t-dialin.net (EHLO koschka) [217.238.19.144] by mail.gmx.net (mp051) with SMTP; 06 Aug 2008 10:13:21 +0200 X-Authenticated: #10360708 X-Provags-ID: V01U2FsdGVkX1/0rCZDNDz0lK/qCTN/+qjrIz2XTU/8SNNfKsj08l iVrkgpv/eYI8Hk Date: Wed, 6 Aug 2008 10:13:21 +0200 From: Steffen Wendzel To: fastcgi-developers@fastcgi.com X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-Id: <20080806101321.cb527bdf.cdp_xe@gmx.net> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.9; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.71 X-CGP-External-Filter: YES Subject: [FASTCGI] apache restart X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2008 08:13:35 -0000 hi, since the list is up again, I will try to post my question again. I develop a fastcgi based application but after I made a few requests I have to restart the apache using /etc/init.d/apache2 force-reload to be able to replace the old executable with the old one. Example: $ sudo cp test2.fcgi /usr/lib/cgi-bin/test2.fcgi cp: regular file "/usr/lib/cgi-bin/test2.fcgi": Text file busy $ sudo /etc/init.d/apache2 force-reload $ sleep 2 <-- takes at least two seconds $ sudo cp test2.fcgi /usr/lib/cgi-bin/test2.fcgi <-- now works fine Do you have any solutions how to optimize this? regards Steffen Wendzel From davidb@pins.net Wed Aug 6 10:19:49 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.37]) by spam.chelsea.net (Postfix) with ESMTP id 08D2C1E2F7 for ; Wed, 6 Aug 2008 10:19:48 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id 60F0E492F for ; Wed, 6 Aug 2008 10:19:38 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.24] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 273008672 for fastcgi-developers@fastcgi.com; Wed, 06 Aug 2008 10:19:38 -0400 Received: from localhost.localdomain (unknown [209.212.65.42]) by spam.chelsea.net (Postfix) with ESMTP id 4A0981E2F7 for ; Wed, 6 Aug 2008 10:19:48 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on abe.chelsea.net X-Spam-Status: No, score=-8.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DOC_MAIL_LIST_BODY_DB,GOOGLE_PORN_LONGER autolearn=ham version=3.2.4 X-Spam-Level: Received: from smtp.chelsea.net ([209.212.66.17] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 273008647 for fastcgi-developers@fastcgi.com; Wed, 06 Aug 2008 10:19:34 -0400 Received: from rarevos.pins.net (rarevos.pins.net [209.212.65.43]) by smtp.chelsea.net (Postfix) with ESMTP id 83D344925; Wed, 6 Aug 2008 10:19:34 -0400 (EDT) Date: Wed, 6 Aug 2008 10:20:38 -0400 (EDT) From: David Birnbaum To: Steffen Wendzel In-Reply-To: <20080806101321.cb527bdf.cdp_xe@gmx.net> X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: References: <20080806101321.cb527bdf.cdp_xe@gmx.net> User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-CGP-External-Filter: YES Cc: fastcgi-developers@fastcgi.com Subject: Re: [FASTCGI] apache restart X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2008 14:19:56 -0000 Steffen, You're trying to overwrite, and the OS has it locked. Maybe you can rename it: mv /usr/lib/cgi-bin/test2.fcgi /usr/lib/cgi-bin/test2.fcgi.bak cp test2.fcgi /usr/lib/cgi-bin/test2.fcgi [ kill test2.fcgi process or whatever ] rm /usr/lib/cgi-bin/test2.fcgi.bak David. ----- On Wed, 6 Aug 2008, Steffen Wendzel wrote: > hi, > > since the list is up again, I will try to post my question again. > > I develop a fastcgi based application but after I made a few requests I have > to restart the apache using > > /etc/init.d/apache2 force-reload > > to be able to replace the old executable with the old one. > > Example: > > $ sudo cp test2.fcgi /usr/lib/cgi-bin/test2.fcgi > cp: regular file "/usr/lib/cgi-bin/test2.fcgi": Text file busy > $ sudo /etc/init.d/apache2 force-reload > $ sleep 2 <-- takes at least two seconds > $ sudo cp test2.fcgi /usr/lib/cgi-bin/test2.fcgi <-- now works fine > > Do you have any solutions how to optimize this? > > regards > Steffen Wendzel > > _______________________________________________ > FastCGI-developers mailing list > FastCGI-developers@mailman.fastcgi.com > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers > From bryan@arcamax.com Thu Aug 7 07:32:46 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.16]) by spam.chelsea.net (Postfix) with ESMTP id 7DE196D7EA for ; Thu, 7 Aug 2008 07:32:46 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id 1FC405E84 for ; Thu, 7 Aug 2008 07:32:33 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.13] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 273088769 for fastcgi-developers@fastcgi.com; Thu, 07 Aug 2008 07:32:32 -0400 Received: from localhost.localdomain (unknown [209.212.65.61]) by spam.chelsea.net (Postfix) with ESMTP id D39B26D7EA for ; Thu, 7 Aug 2008 07:32:42 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on hickory.chelsea.net X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, GOOGLE_PORN_LONGER, RCVD_IN_BSP_TRUSTED, RCVD_IN_SSC_TRUSTED_COI, SPF_HELO_PASS autolearn=ham version=3.2.4 X-Spam-Level: Received: from mail.arcamax.com ([216.174.43.131] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 273088778 for fastcgi-developers@fastcgi.com; Thu, 07 Aug 2008 07:32:24 -0400 Received-SPF: pass receiver=real.pins.net; client-ip=216.174.43.131; envelope-from=bryan@arcamax.com Received: from [192.168.1.103] (ip98-166-129-179.hr.hr.cox.net [98.166.129.179]) by mail.arcamax.com (Postfix) with ESMTP id D5F821FE0EE2 for ; Thu, 7 Aug 2008 07:32:27 -0400 (EDT) X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <489ADD46.7080500@arcamax.com> Date: Thu, 07 Aug 2008 07:32:22 -0400 From: Bryan White User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: fastcgi-developers@fastcgi.com References: <20080806101321.cb527bdf.cdp_xe@gmx.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-arcamax-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: D5F821FE0EE2.F4187 X-arcamax-MailScanner: Found to be clean X-arcamax-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (not cached, score=0.1, required 6, autolearn=disabled, RDNS_DYNAMIC 0.10) X-arcamax-MailScanner-From: bryan@arcamax.com X-CGP-External-Filter: YES Subject: Re: [FASTCGI] apache restart X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2008 11:32:59 -0000 David Birnbaum wrote: > Steffen, > > You're trying to overwrite, and the OS has it locked. Maybe you can > rename it: > > mv /usr/lib/cgi-bin/test2.fcgi /usr/lib/cgi-bin/test2.fcgi.bak > cp test2.fcgi /usr/lib/cgi-bin/test2.fcgi > [ kill test2.fcgi process or whatever ] > rm /usr/lib/cgi-bin/test2.fcgi.bak > > David. A strategy I have used that has worked well is to have the application keep track of the timestamp on its executable file. When the time stamp changes, exit. I do the check before handling each request. It might be better to do it after the request, but that might cause problems being sure you are running the latest version in a compile and test cycle. Then to roll out a new version I do: mv prog prog.old; mv prog.new prog The first method has the advantage of being able to undo the change if it goes horribly wrong. This works as well: rm prog; mv prog.new prog This works because Linux maintains a link to the file as long as it is executing. The disk space is not recovered until exit. This also works beautifully in a gcc compile and test cycle because gcc removes the old one before creating the new one. -- Bryan White From webmaster@cosmicperl.com Thu Aug 7 12:18:19 2008 Return-Path: Received: from localhost.localdomain (spam.chelsea.net [209.212.65.13]) by spam.chelsea.net (Postfix) with ESMTP id 7B32B6D7FE for ; Thu, 7 Aug 2008 12:18:19 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on strohs.chelsea.net X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DOC_MAIL_LIST_BODY_DB, GOOGLE_PORN_LONGER, PINS_GAMBLE_BODY autolearn=ham version=3.2.4 X-Spam-Level: Received: from ns.cosmicsitehosting.com (ns.cosmicsitehosting.com [213.133.65.182]) by smtp.chelsea.net (Postfix) with ESMTP id 55EEB42BA for ; Thu, 7 Aug 2008 12:17:58 -0400 (EDT) Received: from [192.168.1.10] (78-86-207-240.zone4.bethere.co.uk [78.86.207.240] (may be forged)) (authenticated bits=0) by ns.cosmicsitehosting.com (8.13.4/8.13.4) with ESMTP id m77G5kvM017648; Thu, 7 Aug 2008 17:05:51 +0100 X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <489B2034.4080503@cosmicperl.com> Date: Thu, 07 Aug 2008 17:17:56 +0100 From: Lyle User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: David Birnbaum References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: fastcgi-developers@mailman.pins.net Subject: Re: [FASTCGI] List Repair X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2008 16:18:25 -0000 David Birnbaum wrote: > Folks, > > The FastCGI lists have been down for a while due to a mail problem. I > apologize for the length of time it's taken to get them back up. They > should be functional again, although you may have to reset your > password or other settings. > > Cheers, > > David. Hi David, Thought I hadn't had any FastCGI emails for a while... By the way I've been held up the last 6 months on a big software project that has taken up all of my time. I'm finally getting to the stage where I'm incorporating FastCGI on Linux/Apache Linux/Lighttpd Windows/IIS Windows/Apache Windows/Lighttpd I'll be working through and writing guides for each on setting up the server with FastCGI then writing scripts in Perl that'll work across all of them. Wish me luck :) Lyle From davidb@pins.net Fri Aug 8 14:55:57 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.16]) by spam.chelsea.net (Postfix) with ESMTP id B30C96D824 for ; Fri, 8 Aug 2008 14:55:57 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id C1A5548E2 for ; Fri, 8 Aug 2008 14:55:44 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.24] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 273293884 for fastcgi-developers@fastcgi.com; Fri, 08 Aug 2008 14:55:46 -0400 Received: from localhost.localdomain (unknown [209.212.65.33]) by spam.chelsea.net (Postfix) with ESMTP id AA3BA1E2AE for ; Fri, 8 Aug 2008 14:55:56 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on abita.chelsea.net X-Spam-Status: No, score=-8.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DOC_MAIL_LIST_BODY_DB, FOUND_OTB, PINS_GAMBLE_BODY autolearn=ham version=3.2.4 X-Spam-Level: Received: from smtp.chelsea.net ([209.212.66.17] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 273293749 for fastcgi-developers@fastcgi.com; Fri, 08 Aug 2008 14:55:44 -0400 Received: from rarevos.pins.net (rarevos.pins.net [209.212.65.43]) by smtp.chelsea.net (Postfix) with ESMTP id 084EB48BA; Fri, 8 Aug 2008 14:55:42 -0400 (EDT) Date: Fri, 8 Aug 2008 14:56:50 -0400 (EDT) From: David Birnbaum To: Rainer Jung In-Reply-To: <4898D7FB.4030007@kippdata.de> X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: References: <4898D689.10803@kippdata.de> <4898D7FB.4030007@kippdata.de> User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-CGP-External-Filter: YES Cc: fastcgi-developers@fastcgi.com Subject: Re: [FASTCGI] [Patch] Improve handling of interrupted system calls X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2008 18:56:06 -0000 I sent a note off to Rob...I'll see if he can bless this one and take a look at the other open patches that are out there. Thanks for the contribution. David. ----- On Wed, 6 Aug 2008, Rainer Jung wrote: > Since the attachments were scrubbed in the web archive display, here's a > download link to the two files: > > http://people.apache.org/~rjung/mod_fastcgi/patches/interrupted_syscall/ > _______________________________________________ > FastCGI-developers mailing list > FastCGI-developers@mailman.fastcgi.com > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers > From niro@tut.by Mon Aug 11 02:44:57 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.36]) by spam.chelsea.net (Postfix) with ESMTP id 588541E1F9 for ; Mon, 11 Aug 2008 02:44:57 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id E96FB421A for ; Mon, 11 Aug 2008 02:44:41 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.24] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 273471835 for fastcgi-developers@fastcgi.com; Mon, 11 Aug 2008 02:44:42 -0400 Received: from localhost.localdomain (unknown [209.212.65.33]) by spam.chelsea.net (Postfix) with ESMTP id EB3921E1F9 for ; Mon, 11 Aug 2008 02:44:54 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on abita.chelsea.net X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=ham version=3.2.4 X-Spam-Level: Received: from speedy.tutby.com ([195.137.160.40] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 273471824 for fastcgi-developers@fastcgi.com; Mon, 11 Aug 2008 02:44:39 -0400 Received-SPF: error receiver=real.pins.net; client-ip=195.137.160.40; envelope-from=niro@tut.by Received: from [79.98.49.132] (account niro@tut.by HELO [192.168.25.3]) by speedy.tutby.com (CommuniGate Pro SMTP 5.1.12) with ESMTPSA id 33304446 for fastcgi-developers@fastcgi.com; Mon, 11 Aug 2008 09:44:35 +0300 From: Michael Borisov To: fastcgi-developers@fastcgi.com Content-Type: text/plain; charset=UTF-8 Date: Mon, 11 Aug 2008 09:40:49 +0300 X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-Id: <1218436850.30946.1.camel@niro-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 X-CGP-External-Filter: YES Content-Transfer-Encoding: quoted-printable Subject: [FASTCGI] Show image X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 06:44:58 -0000 Hi All! I try to show some image(png,jpg,gif) with fastcgi? Simple CGI example works fine: #include #include using namespace std; int main(){ =20 =EF=BB=BF printf("Content-type: image/gif\r\n"); =EF=BB=BF printf("\r\n"); =EF=BB=BF ifstream in("../image.gif"); =EF=BB=BF if (!in) return 1; =EF=BB=BF char buf; =EF=BB=BF buf =3D in.get(); =EF=BB=BF while (in){ =EF=BB=BF =EF=BB=BF printf("%c",buf); =EF=BB=BF =EF=BB=BF buf =3D in.get(); } in.close(); return 0; } FCGI example don't works: #include #include "fcgi_stdio.h" using namespace std; int main(){ while(FCGI_Accept() >=3D 0) { printf("Content-type: image/gif\r\n"); printf("\r\n"); ifstream in("../image.gif"); if (!in) return 1; char buf; buf =3D in.get(); while (in){ printf("%c",buf); buf =3D in.get(); }=20 in.close(); } return 0; } What wrong with that code ?=20 apache2 2.2.3-4+etch4 libapache2-mod-fastcgi 2.4.2-8=20 libfcgi0c2 2.4.0-6 From bryan@arcamax.com Mon Aug 11 06:39:00 2008 Return-Path: Received: from localhost.localdomain (spam.chelsea.net [209.212.65.13]) by spam.chelsea.net (Postfix) with ESMTP id F121A6D7FB for ; Mon, 11 Aug 2008 06:38:59 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id 8C33E4588 for ; Mon, 11 Aug 2008 06:38:41 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.24] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 273485673 for fastcgi-developers@fastcgi.com; Mon, 11 Aug 2008 06:38:43 -0400 Received: from localhost.localdomain (unknown [209.212.65.33]) by spam.chelsea.net (Postfix) with ESMTP id CB4961E1EE for ; Mon, 11 Aug 2008 06:38:55 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on abita.chelsea.net X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DOC_MAIL_LIST_BODY_DB,RCVD_IN_BSP_TRUSTED,RCVD_IN_SSC_TRUSTED_COI, SPF_HELO_PASS autolearn=ham version=3.2.4 X-Spam-Level: Received: from mail.arcamax.com ([216.174.43.131] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 273485650 for fastcgi-developers@fastcgi.com; Mon, 11 Aug 2008 06:38:34 -0400 Received-SPF: pass receiver=real.pins.net; client-ip=216.174.43.131; envelope-from=bryan@arcamax.com Received: from [192.168.1.103] (ip98-166-129-179.hr.hr.cox.net [98.166.129.179]) by mail.arcamax.com (Postfix) with ESMTP id 001C71FE0E3C for ; Mon, 11 Aug 2008 06:38:41 -0400 (EDT) X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <48A016AE.8030103@arcamax.com> Date: Mon, 11 Aug 2008 06:38:38 -0400 From: Bryan White User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: fastcgi-developers@fastcgi.com References: <1218436850.30946.1.camel@niro-laptop> In-Reply-To: <1218436850.30946.1.camel@niro-laptop> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-arcamax-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 001C71FE0E3C.6482A X-arcamax-MailScanner: Found to be clean X-arcamax-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (not cached, score=0.1, required 6, autolearn=disabled, RDNS_DYNAMIC 0.10) X-arcamax-MailScanner-From: bryan@arcamax.com X-CGP-External-Filter: YES Subject: Re: [FASTCGI] Show image X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 10:39:05 -0000 Michael Borisov wrote: > Hi All! > I try to show some image(png,jpg,gif) with fastcgi? > > ifstream in("../image.gif"); Are you sure that the current directory is what you think it is? -- Bryan White From niro@tut.by Mon Aug 11 11:45:48 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.33]) by spam.chelsea.net (Postfix) with ESMTP id 544F26D809 for ; Mon, 11 Aug 2008 11:45:48 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id E1D0F5FA4 for ; Mon, 11 Aug 2008 11:45:22 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.24] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 273509763 for fastcgi-developers@fastcgi.com; Mon, 11 Aug 2008 11:45:22 -0400 Received: from localhost.localdomain (unknown [209.212.65.37]) by spam.chelsea.net (Postfix) with ESMTP id 00FF01E240 for ; Mon, 11 Aug 2008 11:45:33 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on strohs.chelsea.net X-Spam-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_40, DOC_MAIL_LIST_BODY_DB autolearn=ham version=3.2.4 X-Spam-Level: Received: from speedy.tutby.com ([195.137.160.40] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 273509767 for fastcgi-developers@fastcgi.com; Mon, 11 Aug 2008 11:45:15 -0400 Received-SPF: error receiver=real.pins.net; client-ip=195.137.160.40; envelope-from=niro@tut.by Received: from [91.149.169.144] (account niro@tut.by HELO [91.149.169.144]) by speedy.tutby.com (CommuniGate Pro SMTP 5.1.12) with ESMTPSA id 33616226; Mon, 11 Aug 2008 18:45:23 +0300 From: Michael Borisov To: Bryan White In-Reply-To: <48A016AE.8030103@arcamax.com> References: <1218436850.30946.1.camel@niro-laptop> <48A016AE.8030103@arcamax.com> Content-Type: text/plain Date: Mon, 11 Aug 2008 18:45:22 +0300 X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-Id: <1218469522.15293.4.camel@niro-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-CGP-External-Filter: YES Cc: fastcgi-developers@fastcgi.com Subject: Re: [FASTCGI] Show image X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 15:45:58 -0000 > > > > ifstream in("../image.gif"); > > Are you sure that the current directory is what you think it is? > Nothing change if I shall write full path to file. From dister.kemp@gmail.com Mon Aug 18 09:40:38 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.16]) by spam.chelsea.net (Postfix) with ESMTP id CBCDE6D807 for ; Mon, 18 Aug 2008 09:40:38 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on becks.chelsea.net X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50, DOC_MAIL_LIST_BODY_DB, GOOGLE_PORN_LONGER,HTML_MESSAGE,PINS_GAMBLE_BODY shortcircuit=no autolearn=ham version=3.2.5 X-Spam-Level: Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.226]) by smtp.chelsea.net (Postfix) with ESMTP id 055D4F545 for ; Mon, 18 Aug 2008 08:09:49 -0400 (EDT) Received: by wr-out-0506.google.com with SMTP id 68so2413036wri.15 for ; Mon, 18 Aug 2008 05:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=Uw/ZDXCxZ9uwo6Lzb1UXrEJpcX0em/xEGpwhACWfaic=; b=h5OCQ5a5t3qsO26I6nRY0SbWXWHDr+1riWhBx4B6a56Upah8kpVLvAyEzc70iw+PT5 Lx1rBmIRLyaONAIl1J0wRzIzNpz3NSzcI2S+gHQzdRmwyPSwm7vanR0c5u/PuEuJBZkB fSOvCWv58PoaN52zBVjRynG3DDQLy11UYWCg0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=kBs0q0gpmyzNR9RMGltUKpCCMSAUrcX0AAiely9b/Ic1dPscJixNx3BalZXyIAPRpF nd6uUtzciH3qFFdIsUPNEQia3rolJWYIEElT2Awb9ghPxY+aRbIjSg7TEFVrYodzFmAb CrlFWe8hDplfSW5HcKcqmUhQLtg3jrc03AA9A= Received: by 10.90.31.6 with SMTP id e6mr7721286age.90.1219061408373; Mon, 18 Aug 2008 05:10:08 -0700 (PDT) Received: by 10.90.34.8 with HTTP; Mon, 18 Aug 2008 05:10:08 -0700 (PDT) X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <7378d0a90808180510x284ed01el6e26697022e25ca@mail.gmail.com> Date: Mon, 18 Aug 2008 17:40:08 +0530 From: "Dister Kemp" To: Lyle In-Reply-To: <489B2034.4080503@cosmicperl.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_29612_24172447.1219061408378" References: <489B2034.4080503@cosmicperl.com> Cc: fastcgi-developers@mailman.pins.net Subject: Re: [FASTCGI] List Repair X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 13:40:47 -0000 ------=_Part_29612_24172447.1219061408378 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Lyle, continue the good work pal. Good luck ! Hope you start with Windows/IIS first ! On Thu, Aug 7, 2008 at 9:47 PM, Lyle wrote: > David Birnbaum wrote: > >> Folks, >> >> The FastCGI lists have been down for a while due to a mail problem. I >> apologize for the length of time it's taken to get them back up. They >> should be functional again, although you may have to reset your password or >> other settings. >> >> Cheers, >> >> David. >> > > Hi David, > Thought I hadn't had any FastCGI emails for a while... > > By the way I've been held up the last 6 months on a big software project > that has taken up all of my time. I'm finally getting to the stage where I'm > incorporating FastCGI on Linux/Apache > Linux/Lighttpd > Windows/IIS > Windows/Apache > Windows/Lighttpd > > > I'll be working through and writing guides for each on setting up the > server with FastCGI then writing scripts in Perl that'll work across all of > them. > > Wish me luck :) > > > Lyle > > > _______________________________________________ > FastCGI-developers mailing list > FastCGI-developers@mailman.fastcgi.com > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers > ------=_Part_29612_24172447.1219061408378 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Lyle, continue the good work pal. Good luck !
Hope  you start with Windows/IIS first !

On Thu, Aug 7, 2008 at 9:47 PM, Lyle <webmaster@cosmicperl.com> wrote:
David Birnbaum wrote:
Folks,

The FastCGI lists have been down for a while due to a mail problem.  I apologize for the length of time it's taken to get them back up.  They should be functional again, although you may have to reset your password or other settings.

Cheers,

David.

Hi David,
 Thought I hadn't had any FastCGI emails for a while...

By the way I've been held up the last 6 months on a big software project that has taken up all of my time. I'm finally getting to the stage where I'm incorporating FastCGI on Linux/Apache
Linux/Lighttpd
Windows/IIS
Windows/Apache
Windows/Lighttpd


I'll be working through and writing guides for each on setting up the server with FastCGI then writing scripts in Perl that'll work across all of them.

Wish me luck :)


Lyle


_______________________________________________
FastCGI-developers mailing list
FastCGI-developers@mailman.fastcgi.com
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers

------=_Part_29612_24172447.1219061408378-- From sxk1969@hotmail.com Mon Aug 18 17:01:10 2008 Return-Path: Received: from localhost.localdomain (spam.chelsea.net [209.212.65.13]) by spam.chelsea.net (Postfix) with ESMTP id 890ED6D7F8 for ; Mon, 18 Aug 2008 17:01:10 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on strohs.chelsea.net X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_50, BOTNET, BOTNET_BADDNS, DOC_MAIL_LIST_BODY_DB, GOOGLE_PORN_LONGER, HTML_MESSAGE, PINS_GAMBLE_BODY shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: Received: from bay0-omc2-s37.bay0.hotmail.com (bay0-omc2-s37.bay0.hotmail.com [65.54.246.173]) by smtp.chelsea.net (Postfix) with ESMTP id 4B8F65584 for ; Mon, 18 Aug 2008 17:00:35 -0400 (EDT) Received: from BAY127-W36 ([65.55.132.71]) by bay0-omc2-s37.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 18 Aug 2008 14:00:54 -0700 X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: Content-Type: multipart/alternative; boundary="_cf6c983b-2e87-4bfa-bb29-ce5719abcaa3_" X-Originating-IP: [192.150.22.5] From: Saikat Kanjilal To: Date: Mon, 18 Aug 2008 14:00:53 -0700 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 18 Aug 2008 21:00:54.0038 (UTC) FILETIME=[80CB5360:01C90175] Subject: [FASTCGI] Fastcgi C++ error on Apache and windows X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 21:01:21 -0000 --_cf6c983b-2e87-4bfa-bb29-ce5719abcaa3_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello Folks: I have written a fascgi client using c++ and the fcgiapp module. I am usin= g Apache 2.0.63 as my webserver and Windows Server 2003 Web Edition as my o= perating system. Our load testing environment consists of Linux Hosts runni= ng Windows Server 2003 Virtual Machines with this fastcgi c++ client. Unf= ortunately I had to use windows due to the fact that one of the libraries w= as only available on windows. Anyways during the last set of load tests I = see the following error intermittently in the Apache logs: Incomplete headers (0 bytes) received from server followed by my servername= (i.e. the fastcgi client). I have searched the web and did not see any solutions to this problem excep= t for implementing my own signal handler which I don't really wish to do: I am attaching parts of the code here for reference: int main(int argc=2C char*const argv[] ) { try { //create an input output and an error stream //listen on a socket with an appropriate backlog //exit if the socket is unable to be opened //if the request currently needs to be initialized exit std::string port=3D":9000"=3B std::string listenQueueBacklog=3D400=3B FCGX_Stream *in=2C *out=2C *err=3B FCGX_ParamArray envp=3B if (FCGX_Init()) exit(1)=3B int listen_socket =3D FCGX_OpenSocket(port.c_str()=2C atoi(listenQu= eBacklog.c_str()))=3B if (listen_socket < 0) exit(1)=3B FCGX_Request request=3B if (FCGX_InitRequest(&request=2C listen_socket=2C 0)) exit(1)=3B =20 while (FCGX_Accept(&in=2C &out=2C &err=2C &envp) >=3D 0) { //print out the content type and retrieve the query string //which is everything after the question mark in the URL FCGX_FPrintF(out=2C"Content-type: text/html\r\nStatus: 200 OK\r= \n\r\n")=3B //main part of the code goes here .......... } //end while (FCGX_Accept(&in=2C &out=2C &err=2C &envp) >=3D 0) }//end try block catch (std::exception& ex) { } =20 return 0=3B } Note that this code only displays the Incomplete headers error during load = testing=2C whats worse is that when the environment for load testing is sli= ghtly different (meaning using less virtual machines per host) we dont see = this error anymore. I would really appreciate some help with this issue. Thanks Again _________________________________________________________________ Get thousands of games on your PC=2C your mobile phone=2C and the web with = Windows=AE. http://clk.atdmt.com/MRT/go/108588800/direct/01/= --_cf6c983b-2e87-4bfa-bb29-ce5719abcaa3_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello Folks:
I have written a fascgi client using c++ and the fcgiapp mo= dule. =3B I am using Apache 2.0.63 as my webserver and Windows Server 2= 003 Web Edition as my operating system. Our load testing environment consis= ts of Linux Hosts running Windows Server 2003 Virtual Machines with this fa= stcgi c++ client.  =3B Unfortunately I had to use windows due to the fa= ct that one of the libraries was only available on windows. =3B Anyways= during the last set of load tests I see the following error intermittently= in the Apache logs:

Incomplete headers (0 bytes) received from serv= er followed by my servername (i.e. the fastcgi client).

I have searc= hed the web and did not see any solutions to this problem except for implem= enting my own signal handler which I don't really wish to do:

I am a= ttaching parts of the code here for reference:


int main(int argc= =2C char*const argv[] )
{

 =3B =3B =3B try
 = =3B =3B =3B {

 =3B =3B =3B  =3B =3B = =3B //create an input output and an error stream
 =3B =3B = =3B  =3B =3B =3B //listen on a socket with an appropriate backl= og
 =3B =3B =3B  =3B =3B =3B //exit if the socke= t is unable to be opened
 =3B =3B =3B  =3B =3B = =3B //if the request currently needs to be initialized exit
 =3B&nbs= p=3B =3B =3B =3B =3B =3B std::string port=3D":9000"=3B<= br> =3B =3B =3B =3B =3B =3B =3B std::string lis= tenQueueBacklog=3D400=3B
 =3B =3B =3B  =3B =3B = =3B FCGX_Stream *in=2C *out=2C *err=3B
 =3B =3B =3B  =3B=  =3B =3B FCGX_ParamArray envp=3B
 =3B =3B =3B  = =3B =3B =3B if (FCGX_Init())
 =3B =3B =3B  =3B&n= bsp=3B =3B  =3B =3B =3B exit(1)=3B
 =3B =3B = =3B  =3B =3B =3B int listen_socket =3D FCGX_OpenSocket(port.c_s= tr()=2C atoi(listenQueBacklog.c_str()))=3B
 =3B =3B =3B &nbs= p=3B =3B =3B if (listen_socket <=3B 0) exit(1)=3B
 =3B&nbs= p=3B =3B  =3B =3B =3B FCGX_Request request=3B
 =3B&n= bsp=3B =3B  =3B =3B =3B if (FCGX_InitRequest(&=3Brequest= =2C listen_socket=2C 0)) exit(1)=3B
 =3B =3B =3B

&nb= sp=3B =3B =3B  =3B =3B =3B while (FCGX_Accept(&=3Bin= =2C &=3Bout=2C &=3Berr=2C &=3Benvp) >=3B=3D 0)
 =3B = =3B =3B  =3B =3B =3B {


 =3B =3B =3B =  =3B =3B =3B  =3B =3B =3B //print out the content t= ype and retrieve the query string
 =3B =3B =3B  =3B = =3B =3B  =3B =3B =3B //which is everything after the questi= on mark in the URL
 =3B =3B =3B  =3B =3B =3B &nb= sp=3B =3B =3B FCGX_FPrintF(out=2C"Content-type: text/html\r\nStatus= : 200 OK\r\n\r\n")=3B


 =3B =3B =3B  =3B =3B&= nbsp=3B  =3B =3B =3B //main part of the code goes here
 = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B ..........



 =3B =3B =3B  =3B = =3B =3B } //end while (FCGX_Accept(&=3Bin=2C &=3Bout=2C &=3Ber= r=2C &=3Benvp) >=3B=3D 0)
 =3B =3B =3B }//end try block=
 =3B =3B =3B catch (std::exception&=3B ex)
 =3B&n= bsp=3B =3B {
 =3B =3B =3B }
 =3B =3B =3B =
 =3B =3B =3B return 0=3B
}




Note that = this code only displays the Incomplete headers error during load testing=2C= whats worse is that when the environment for load testing is slightly diff= erent (meaning using less virtual machines per host) we dont see this error= anymore.


I would really appreciate some help with this issue.Thanks Again



Get thousands of games on your PC=2C your= mobile phone=2C and the web with Windows=AE. Game with Windows = --_cf6c983b-2e87-4bfa-bb29-ce5719abcaa3_-- From eddie.bishop@gmail.com Mon Aug 18 18:49:08 2008 Return-Path: Received: from localhost.localdomain (spam.chelsea.net [209.212.65.13]) by spam.chelsea.net (Postfix) with ESMTP id A47326D7F9 for ; Mon, 18 Aug 2008 18:49:08 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on strohs.chelsea.net X-Spam-Status: No, score=2.9 required=5.0 tests=BAYES_50, BOTNET, BOTNET_BADDNS, DKIM_SIGNED,HTML_MESSAGE,PINS_GAMBLE_BODY,URL_WITH_PUNCTUAT_END2 shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: ** Received: from hs-out-0708.google.com (hs-out-0708.google.com [64.233.178.243]) by smtp.chelsea.net (Postfix) with ESMTP id 2817552A1 for ; Mon, 18 Aug 2008 18:48:23 -0400 (EDT) Received: by hs-out-0708.google.com with SMTP id z77so815943hsz.9 for ; Mon, 18 Aug 2008 15:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=qjahXZ9ElbmTD4NVEzjODLuD0sZouWRLww7ED+hq6UQ=; b=enqwb+8WrJKtggB8eT8pDMPe7H/f6XhTQr8DSBLi71BZIShgX7nt7kcEns01EAmtPV bzKFDuBJB31CXfv6pR+QH/I44wZNK7ryRA7WGBV3ZQsd2ayzPMm3KOXENqib9qnpgiLj EMzPDflVASObTnfqbZmPq1tn2N1QGCN9V6Y9c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=SqhuPVOH59tdjC0PDGkcoRDo8SiAI8UWdJU4usSbv1pF/HMJKeqHa/WWeFhLZvqGRg 9jmvmElkhYkannLVJoXAjdzx9opR67qtR8NhabLhutTFs9RlKT2Y7AHwuQaR/r4nIsE5 Rt2YFvvfCSrFVto4Sar14SG9sU0uB8PdHcbzQ= Received: by 10.142.229.5 with SMTP id b5mr2260614wfh.50.1219099722339; Mon, 18 Aug 2008 15:48:42 -0700 (PDT) Received: by 10.142.51.5 with HTTP; Mon, 18 Aug 2008 15:48:42 -0700 (PDT) X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: Date: Mon, 18 Aug 2008 16:48:42 -0600 From: "Eddie Bishop" To: fastcgi-developers@mailman.fastcgi.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_168836_5308664.1219099722336" X-Mailman-Approved-At: Mon, 18 Aug 2008 23:26:53 -0400 Subject: [FASTCGI] obtaining a core file X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 22:49:14 -0000 ------=_Part_168836_5308664.1219099722336 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, I'm developing an application that runs under fastcgi on linux/apache. The application crashes at seemingly random times (I don't think it's fastcgi's fault). I don't know how to duplicate the problem, so I need to be able to setup the application to generate a core file, so that when it happens again, I can debug the core file. I can't debug the issue outside of fastcgi (in a development environment), becuase I don't know how to reproduce the issue. So the plan is to set it up to dump a core file next time it happens in production. How can I set this up, and where would the core file be dumped to? I know about the ulimit() function, but in my development environment (running outside of fastcgi) I couldn't get it to return anything besides 0. ( see http://www.opengroup.org/onlinepubs/009695399/functions/ulimit.html ) Ideally, I'd like a solution that doesn't require me to build fastcgi again. In other words, I'd like a fix that only needs me to edit the source of my app and not the source of fastcgi. Thanks, Eddie ------=_Part_168836_5308664.1219099722336 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi all,

I'm developing an application that runs under fastcgi on linux/apache. The application crashes at seemingly random times (I don't think it's fastcgi's fault). I don't know how to duplicate the problem, so I need to be able to setup the application to generate a core file, so that when it happens again, I can debug the core file. I can't debug the issue outside of fastcgi (in a development environment), becuase I don't know how to reproduce the issue. So the plan is to set it up to dump a core file next time it happens in production. How can I set this up, and where would the core file be dumped to? I know about the ulimit() function, but in my development environment (running outside of fastcgi) I couldn't get it to return anything besides 0. ( see http://www.opengroup.org/onlinepubs/009695399/functions/ulimit.html )

Ideally, I'd like a solution that doesn't require me to build fastcgi again. In other words, I'd like a fix that only needs me to edit the source of my app and not the source of fastcgi.

Thanks,
Eddie
------=_Part_168836_5308664.1219099722336-- From sprog@online.ru Sat Aug 23 08:56:37 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.37]) by spam.chelsea.net (Postfix) with ESMTP id 642151E1AB for ; Sat, 23 Aug 2008 08:56:37 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on strohs.chelsea.net X-Spam-Status: No, score=2.5 required=5.0 tests=BAYES_50, BOTNET, BOTNET_BADDNS, BOTNET_SERVERWORDS, DOC_MAIL_LIST_BODY_DB, GOOGLE_PORN_LONGER, HTML_MESSAGE, MIME_HTML_ONLY, PINS_GAMBLE_BODY shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: ** Received: from smtp-18.masterhost.ru (smtp-18.masterhost.ru [83.222.24.118]) by smtp.chelsea.net (Postfix) with SMTP id A701958EA for ; Sat, 23 Aug 2008 08:56:20 -0400 (EDT) Received: (qmail 44340 invoked from network); 23 Aug 2008 12:55:58 -0000 Received: from unknown (HELO c3po) (franchuk@mp3.ru@84.47.182.98) by smtp1.masterhost.ru with SMTP; 23 Aug 2008 12:55:58 -0000 Date: Sat, 23 Aug 2008 16:57:06 +0400 From: Igor X-Mailer: The Bat! (v3.99.3) Professional X-Priority: 3 (Normal) X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <101705567.20080823165706@online.ru> To: fastcgi-developers@mailman.fastcgi.com In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [FASTCGI] Fastcgi C++ error on Apache and windows X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Igor List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 12:56:41 -0000

Hello Saikat,


Tuesday, August 19, 2008, 1:00:53 AM, you wrote:


 Check our your test environment's worker.c setup.

 <IfModule worker.c>

 </IfModule>


 The issue you described is related to either FastCGI load balancer or your Apache2 thread manager.

 I would go to worker.c first. By default the worker.c (on windows that is the only supported model) is set up to work 

 on a very powerless machine therefore the ServerLimit as well as MaxClients and MaxRequestsPerChild is configured to consume 

 less memory and CPU (about 3-5% of available modern servers). I wouldn't go into details describing how that affects your Fast CGI servers, 

 just remember - when you start performance test (max server load test) your Apache configuration should allow it to consume almost all server 

 resources. By default you're utilizing only 5% of your server, all the threads are consumed and you got incomplete header error while your

 server load is only 5%. Change parameters in worker.c according to the resources available. Likely that config will be checked by a teenager first by sending 

 the server a numerous requests and seeing how it affects the server's ability to respond. Actually any server could be DOSed, but that is the whole another story.

   

Note that this code only displays the Incomplete headers error during load testing, whats worse is that when the environment for load testing is slightly different (meaning using less virtual machines per host) we dont see this error anymore.


 That might happen because the less hosts you have the more threads are available. It's all in the worker.c. I recommend you to study how Apache2 is

 utilizing available resources before running performance tests. Of course Apache has a built in load restrictions otherwise you would end up with a DOSed host that

 you cannot access even via console.



>

Hello Folks:

I have written a fascgi client using c++ and the fcgiapp module.  I am using Apache 2.0.63 as my webserver and Windows Server 2003 Web Edition as my operating system. Our load testing environment consists of Linux Hosts running Windows Server 2003 Virtual Machines with this fastcgi c++ client.   Unfortunately I had to use windows due to the fact that one of the libraries was only available on windows.  Anyways during the last set of load tests I see the following error intermittently in the Apache logs:


Incomplete headers (0 bytes) received from server followed by my servername (i.e. the fastcgi client).


I have searched the web and did not see any solutions to this problem except for implementing my own signal handler which I don't really wish to do:


I am attaching parts of the code here for reference:



int main(int argc, char*const argv[] )

{


    try

    {


        //create an input output and an error stream

        //listen on a socket with an appropriate backlog

        //exit if the socket is unable to be opened

        //if the request currently needs to be initialized exit

        std::string port=":9000";

        std::string listenQueueBacklog=400;

        FCGX_Stream *in, *out, *err;

        FCGX_ParamArray envp;

        if (FCGX_Init())

            exit(1);

        int listen_socket = FCGX_OpenSocket(port.c_str(), atoi(listenQueBacklog.c_str()));

        if (listen_socket < 0) exit(1);

        FCGX_Request request;

        if (FCGX_InitRequest(&request, listen_socket, 0)) exit(1);

    


        while (FCGX_Accept(&in, &out, &err, &envp) >= 0)

        {



            //print out the content type and retrieve the query string

            //which is everything after the question mark in the URL

            FCGX_FPrintF(out,"Content-type: text/html\r\nStatus: 200 OK\r\n\r\n");



            //main part of the code goes here

            ..........




        } //end while (FCGX_Accept(&in, &out, &err, &envp) >= 0)

    }//end try block

    catch (std::exception& ex)

    {

    }

    

    return 0;

}





Note that this code only displays the Incomplete headers error during load testing, whats worse is that when the environment for load testing is slightly different (meaning using less virtual machines per host) we dont see this error anymore.



I would really appreciate some help with this issue.

Thanks Again





Get thousands of games on your PC, your mobile phone, and the web with Windows®. Game with Windows 





-- 

www.rol.ru

Best regards,

 Igor                            mailto:sprog@online.ru

From sprog@online.ru Mon Aug 25 15:03:04 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.33]) by spam.chelsea.net (Postfix) with ESMTP id E136B1E1E8 for ; Mon, 25 Aug 2008 15:03:03 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on abita.chelsea.net X-Spam-Status: No, score=1.8 required=5.0 tests=AWL,BAYES_50,BOTNET, BOTNET_BADDNS,BOTNET_SERVERWORDS,GOOGLE_PORN_LONGER,PINS_GAMBLE_BODY shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: * Received: from smtp-19.masterhost.ru (smtp-19.masterhost.ru [83.222.24.119]) by smtp.chelsea.net (Postfix) with SMTP id 5459B44DA for ; Mon, 25 Aug 2008 15:02:53 -0400 (EDT) Received: (qmail 47533 invoked from network); 25 Aug 2008 19:02:28 -0000 Received: from unknown (HELO c3po) (franchuk@mp3.ru@84.47.182.98) by smtp1.masterhost.ru with SMTP; 25 Aug 2008 19:02:28 -0000 Date: Mon, 25 Aug 2008 23:03:18 +0400 From: Igor X-Mailer: The Bat! (v3.99.3) Professional X-Priority: 3 (Normal) X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <676113457.20080825230318@online.ru> To: fastcgi-developers@mailman.fastcgi.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [FASTCGI] Fastcgi C++ error on Apache and windows, corrections X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Igor List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Aug 2008 19:03:09 -0000 Hello All, It seems that I've been wrong about worker.c, worker.c is not a default mpm on windows but rather mpm_winnt. Instead of giving advises on tuning worker.c parameters for win32 I should have advised mpm_winnt's parameters which are a bit limited. Actually mpm_winnt's ThreadsPerChild is the only parameter which can make difference. The mpm config for win32 should look like ThreadsPerChild 600 MaxRequestsPerChild 0 > Check our your test environment's worker.c setup. > > > > The issue you described is related to either FastCGI load balancer or your Apache2 thread manager. > I would go to worker.c first. By default the worker.c (on windows that is the only supported model) is set up to work > on a very powerless machine therefore the ServerLimit as well as MaxClients and MaxRequestsPerChild is configured to consume > less memory and CPU (about 3-5% of available modern servers). I wouldn't go into details describing how that affects your Fast CGI servers, > just remember - when you start performance test (max server load test) your Apache configuration should allow it to consume almost all server > resources. By default you're utilizing only 5% of your server, all the threads are consumed and you got incomplete header error while your > server load is only 5%. Change parameters in worker.c according to the resources available. Likely that config will be checked by a teenager first by sending > the server a numerous requests and seeing how it affects the server's ability to respond. Actually any server could be DOSed, but that is the whole another story. > Note that this code only displays the Incomplete headers error during load testing, whats worse is that when the environment for load testing is slightly different (meaning using less virtual machines per host) we dont see this error anymore. > That might happen because the less hosts you have the more threads are available. It's all in the worker.c. I recommend you to study how Apache2 is > utilizing available resources before running performance tests. Of course Apache has a built in load restrictions otherwise you would end up with a DOSed host that > you cannot access even via console. -- Best regards, Igor mailto:sprog@online.ru From jsprenkle@gmail.com Tue Aug 26 00:30:21 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.61]) by spam.chelsea.net (Postfix) with ESMTP id 0E26A1E210 for ; Tue, 26 Aug 2008 00:30:21 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hickory.chelsea.net X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, BOTNET, BOTNET_BADDNS, DKIM_SIGNED,DOC_MAIL_LIST_BODY_DB,GOOGLE_PORN_LONGER,PINS_GAMBLE_BODY shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: * Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by smtp.chelsea.net (Postfix) with ESMTP id 021C24E3F for ; Tue, 26 Aug 2008 00:30:16 -0400 (EDT) Received: by py-out-1112.google.com with SMTP id u77so1369026pyb.5 for ; Mon, 25 Aug 2008 21:30:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=Mq6bglzNbpbMtaCmi1CVGrnnDN7w6FFcJNXI1E0R2gM=; b=Zz95u+TWjP/mnbUaoIXln+PJWj4h1Bc+45FVj3iM5PgFAQmoF101YY9q8BZQhQTIDH yZbaqlP4uoWQ5ZPYGfZBpblJ+Xfjn1HrP2k6t5x3U59t7NhoQv3kBiR7bnJECj+JIsH5 VbIV+i6KApQ53nDBPDjj6l1IjnorhV52rnPFw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=bh6rZc+YqqH2V4bd/74I38ubWd7EgJpptp1rJnT2ZK6jlZebOVHMYKwqeaXL9MgX65 UHZ8b6dFz2YSjj+5ej8qBgP0Ssif/ND7ZblcpwiAdcRGOFPrdwuzzeDky8+VOCuX4tVb va4T70ICdZTURafVI8CW1a1A83DJwisDmERGA= Received: by 10.115.73.20 with SMTP id a20mr4212565wal.32.1219725014966; Mon, 25 Aug 2008 21:30:14 -0700 (PDT) Received: by 10.114.254.17 with HTTP; Mon, 25 Aug 2008 21:30:14 -0700 (PDT) X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <1b5f39a10808252130g4104cccfodfb7d80048f4a241@mail.gmail.com> Date: Mon, 25 Aug 2008 23:30:14 -0500 From: "Jay Sprenkle" To: fastcgi-developers@mailman.fastcgi.com MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [FASTCGI] apache 2.2+fastcgi+cgicc X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2008 04:30:26 -0000 Good evening all, I'm trying to get a fastcgi+cgicc application working and I've run into a snag. I'm not sure if it's a bug or I'm using the code incorrectly. Any suggestions would be appreciated. Here's the setup: Apache 2.x (latest version, running on windows xp) is configured to start a single instance of my fastcgi application and communicate over a tcp connection. I picked a random port in the 9000 range. The application starts and I can trace it to the point in the fcgx initialization where it checks stdin/stdout/stderr (function os_libinit() ). The comments say "Determine if this library is being used to listen for FastCGI connections. This is communicated by STDIN containing a valid handle to a listener object". From the web server logs the fastcgi dll is loading my application but tt this point all of the streams return as valid. Here's the code from os_libinit(): if((GetStdHandle(STD_OUTPUT_HANDLE) == INVALID_HANDLE_VALUE) && (GetStdHandle(STD_ERROR_HANDLE) == INVALID_HANDLE_VALUE) && (GetStdHandle(STD_INPUT_HANDLE) != INVALID_HANDLE_VALUE) ) Is this a bug in the fastcgi dll/Apache or am I using it wrong? The next bit of code in the same function checks for an array passed by the initialization call. /* * If there are no stdioFds passed in, we're done. */ if(stdioFds == NULL) { libInitialized = 1; return 0; } Since it always passes null the return is executed. The initialization never calls accept() and never sets the listenType variable. The later calls to fcgx_accept() crash trying to read from the uninitialized web server ipc connection. Also, I plan to modify the library to time out on accept calls instead of blocking forever. I'd like for my fastcgi application to be able to perform maintenance tasks. I planned on detecting the accept() timeout and using that as a reasonable indication the system isn't busy and doesn't have any pending requests to process. I planned on using select() to determine if there were pending requests. Is there any interest in this code? I'd be happy to donate it to the project. Thanks for your time, Jay From Tom@tomdonovan.net Tue Aug 26 08:58:05 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.30]) by spam.chelsea.net (Postfix) with ESMTP id 2C1F31E21D for ; Tue, 26 Aug 2008 08:58:05 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on toto.chelsea.net X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, BOTNET, BOTNET_BADDNS, DOC_MAIL_LIST_BODY_DB, GOOGLE_PORN_LONGER, PINS_GAMBLE_BODY shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: * Received: from mout.perfora.net (mout.perfora.net [74.208.4.197]) by smtp.chelsea.net (Postfix) with ESMTP id 8CA0B5A14 for ; Tue, 26 Aug 2008 08:57:57 -0400 (EDT) Received: from [192.168.11.2] (pool-71-243-14-42.bos.east.verizon.net [71.243.14.42]) by mrelay.perfora.net (node=mrus0) with ESMTP (Nemesis) id 0MKp8S-1KXy7F3SUy-0005kN; Tue, 26 Aug 2008 08:57:49 -0400 X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <48B3FDC8.6030302@tomdonovan.net> Date: Tue, 26 Aug 2008 08:57:44 -0400 From: Tom Donovan User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: fastcgi-developers@mailman.fastcgi.com References: <1b5f39a10808252130g4104cccfodfb7d80048f4a241@mail.gmail.com> In-Reply-To: <1b5f39a10808252130g4104cccfodfb7d80048f4a241@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX184Bz4Ho/YCKonED2C50Ut+fGMfof8CSAEl3ur IKsf+p6UnB3Su5M3PxESyjE3fLy7CNU/S1ACeF1ZOUVpcRcLhe jo8W5PMHNMmSXys8/1f13pF14Cctgvo Subject: Re: [FASTCGI] apache 2.2+fastcgi+cgicc X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Tom.Donovan@acm.org List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2008 12:58:08 -0000 Jay Sprenkle wrote: > Good evening all, > > I'm trying to get a fastcgi+cgicc application working and I've run > into a snag. I'm not sure if it's a bug or I'm using the code > incorrectly. Any suggestions would be appreciated. > > Here's the setup: > Apache 2.x (latest version, running on windows xp) is configured to > start a single instance of my fastcgi application and communicate over > a tcp connection. I picked a random port in the 9000 range. > ... > > if((GetStdHandle(STD_OUTPUT_HANDLE) == INVALID_HANDLE_VALUE) && > (GetStdHandle(STD_ERROR_HANDLE) == INVALID_HANDLE_VALUE) && > (GetStdHandle(STD_INPUT_HANDLE) != INVALID_HANDLE_VALUE) ) > > Is this a bug in the fastcgi dll/Apache or am I using it wrong? > Apache 2.2.9 included APR 1.3, which introduced an incompatible change to the way processes are created on Windows. You will need to change mod_fastcgi and rebuild it for Apache 2.2.9 or higher. Starting with Apache 2.2.9, it is necessary to call apr_procattr_io_set() to correctly configure stdin, stdout, and stderr for fastcgi programs before calling apr_procattr_child_in_set(). Here is a patch to fcgi_pm.c which will make mod_fastcgi compatible with Apache 2.2.9+. The patch affects the WIN32 portion of fcgi_pm.c, as this problem is specific to Windows. -tom- --- fcgi_pm.c 2004-04-14 22:01:26.000000000 -0400 +++ fcgi_pm.c 2008-08-26 08:22:15.856008700 -0400 @@ -559,6 +559,10 @@ if (apr_os_file_put(&file, &listen_handle, 0, tp)) goto CLEANUP; + /* required for APR 1.3+ */ + if (apr_procattr_io_set(procattr, APR_FULL_BLOCK, APR_NO_FILE, APR_NO_FILE)) + goto CLEANUP; + /* procattr is opaque so we have to use this - unfortuantely it dups */ if (apr_procattr_child_in_set(procattr, file, NULL)) goto CLEANUP; From whoami@autistici.org Wed Aug 27 10:50:57 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.37]) by spam.chelsea.net (Postfix) with ESMTP id DBAF61E268 for ; Wed, 27 Aug 2008 10:50:57 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on strohs.chelsea.net X-Spam-Status: No, score=1.5 required=5.0 tests=AWL,BAYES_50,BOTNET, BOTNET_BADDNS, DOC_MAIL_LIST_BODY_DB shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: * Received: from confino.investici.org (investici.nine.ch [217.150.252.179]) by smtp.chelsea.net (Postfix) with ESMTP id 58F5159D3 for ; Wed, 27 Aug 2008 10:50:44 -0400 (EDT) Received: by confino.investici.org (Postfix, from userid 33) id D11F6844AE; Wed, 27 Aug 2008 16:50:42 +0200 (CEST) To: fastcgi-developers@mailman.fastcgi.com MIME-Version: 1.0 Date: Wed, 27 Aug 2008 16:50:42 +0200 From: WhoAmI X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <061a6cee1ec58aa072a0d44ac110ffca@localhost> X-Sender: whoami@autistici.org User-Agent: A/I Webmail (roundcube 0.1rc2) Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: [FASTCGI] Debian - Php5 - FastCGI Issue X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list Reply-To: whoami@autistici.org List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2008 14:51:06 -0000 Hello list, I'm using Apache2+FastCGI+Php5 on Debian Etch and i think i've this issue: https://bugs.launchpad.net/debian/+bug/162082 FastCGI + Php5 use up all the available RAM. Is there any new workaround/fix? (this workaround doesn't work for me http://launchpadlibrarian.net/14265535/phpkiller.sh) Do you know if its work fine on Gentoo? Thanks --WhoAmI- Email: whoami@autistici.org WebSite: http://www.autistici.org/whoami/ From chris_se@gmx.net Thu Aug 28 00:52:43 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.61]) by spam.chelsea.net (Postfix) with ESMTP id EEA666D7FB for ; Thu, 28 Aug 2008 00:52:42 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hickory.chelsea.net X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_50, BOTNET, BOTNET_BADDNS, BOTNET_SERVERWORDS shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: * Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by smtp.chelsea.net (Postfix) with SMTP id 671094CAC for ; Thu, 28 Aug 2008 00:52:38 -0400 (EDT) Received: (qmail invoked by alias); 28 Aug 2008 04:52:36 -0000 Received: from p54A14FE7.dip.t-dialin.net (EHLO chris-se.dyndns.org) [84.161.79.231] by mail.gmx.net (mp040) with SMTP; 28 Aug 2008 06:52:36 +0200 X-Authenticated: #186999 X-Provags-ID: V01U2FsdGVkX18qPyZWAyEq17LwTeWnclrg+e1U/wHOkwm1FSQ2Ay mrXuI5hWiNzcuq Received: from [192.168.100.13] (cobalt.seiler.lan [192.168.100.13]) by chris-se.dyndns.org (Postfix) with ESMTP id 8EA631AF00 for ; Thu, 28 Aug 2008 06:01:36 +0200 (CEST) X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <48B62EA6.8070407@gmx.net> Date: Thu, 28 Aug 2008 06:50:46 +0200 From: Christian Seiler User-Agent: Thunderbird 2.0.0.16 (X11/20080707) MIME-Version: 1.0 To: fastcgi-developers@mailman.fastcgi.com X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 Subject: [FASTCGI] [PATCH] Updated patch for -pass-header correct handling X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2008 04:52:49 -0000 Hi, I was contacted about my patch for correctly handling the -pass-header option [1]. It turns out that my patch didn't work with Apache 1.3 - I just updated it so that it works with Apache 1.3, too.: http://www.christian-seiler.de/temp/mod_fastcgi-patches/pass-headers.patch And I somehow can't find my followup posting in the public archives, so I'll repost the patch for the other issue I had with mod_fastcgi, for anyone who's interested: > Also, I discovered another issue with mod_fastcgi: If a CGI script sends > two 'Status: ' headers, mod_fastcgi will cause an internal server error. > Yes, it may not be a very good idea to send two status lines BUT a) the > CGI specification does not forbid it explicitely and b) Apache does not > complain when this happens with normal CGI scripts. As I see no reason > to enforce such strictness (Apache with normal CGI doesn't, lighttpd > with FastCGI doesn't) and I came across a few scripts that caused this > kind of problem with mod_fastcgi, here's a patch that removes the > duplicate header check: > http://www.christian-seiler.de/temp/mod_fastcgi-patches/duplicate-allowed.patch Regards, Christian [1] From jsprenkle@gmail.com Fri Aug 29 08:47:23 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.36]) by spam.chelsea.net (Postfix) with ESMTP id B97506D7F7 for ; Fri, 29 Aug 2008 08:47:23 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on elphaba.chelsea.net X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, BOTNET, BOTNET_BADDNS, DKIM_SIGNED, GOOGLE_PORN_LONGER, PINS_GAMBLE_BODY shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: * Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.225]) by smtp.chelsea.net (Postfix) with ESMTP id A04BB4596 for ; Fri, 29 Aug 2008 08:47:20 -0400 (EDT) Received: by rv-out-0506.google.com with SMTP id b25so833071rvf.41 for ; Fri, 29 Aug 2008 05:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=5z20cdKI5oHSyCUWMUQPHfwvycdHF2MxNY3JpI02YJU=; b=uazAFVO43IY+tKuXkUY+7Ri55CqOtdPik6Xi80u19ygGWq2JbOcZkbvY2bBLCmp8Hd gpTqBS6YQFgkvbYd8/NNQXjc3+KDCuBByUxZYFNz64tlLmfYITpw/df4H/8Nq4o//zYq s1EpF44v5IXEFyAZEdzzHSFurV5KcY0tgakSI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=fVOnnTRXUwHuay0q6LujGshkMzH9OsI1UG9V59Ox3ZdyLMejTbSzOnNTy5y2v0VKbh Nj1h9FN04Mg7Fy9GIy/IVEOcEj51NtqADZ4lzY1dSMwnoqCxLQEjU8va+cuSVHTlybEc dgFlo2fnGBvJSv3PI3HjtZ11XezuDVABkEFQ8= Received: by 10.114.210.2 with SMTP id i2mr2574570wag.18.1220014038974; Fri, 29 Aug 2008 05:47:18 -0700 (PDT) Received: by 10.114.254.17 with HTTP; Fri, 29 Aug 2008 05:47:18 -0700 (PDT) X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <1b5f39a10808290547g197afc61h864b1213135a0a60@mail.gmail.com> Date: Fri, 29 Aug 2008 07:47:18 -0500 From: "Jay Sprenkle" To: fastcgi-developers@mailman.fastcgi.com MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [FASTCGI] bug in os_win32.c X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2008 12:47:27 -0000 I've found a bug in the fastcgi source: The original code from os_win32.c: if (*bindPath != ':') { char * p = strchr(bindPath, ':'); int len = p - bindPath + 1; host = malloc(len); strncpy(host, bindPath, len); host[len] = '\0'; } If this code is executed the last line that null terminates the allocated buffer writes past the end of the allocated space. It probably ought to be this: if (*bindPath != ':') { char * p = strchr(bindPath, ':'); int len = p - bindPath; host = malloc(len + 1); strncpy(host, bindPath, len); host[len] = '\0'; } more to come... Jay From jsprenkle@gmail.com Fri Sep 5 19:01:01 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.33]) by spam.chelsea.net (Postfix) with ESMTP id 58B0F1E481 for ; Fri, 5 Sep 2008 19:01:01 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on abita.chelsea.net X-Spam-Status: No, score=2.1 required=5.0 tests=AWL,BAYES_50,BOTNET, BOTNET_BADDNS, DKIM_SIGNED, FOUND_OTB, GOOGLE_PORN_LONGER, PINS_GAMBLE_BODY, URL_WITH_PUNCTUAT_END2 shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: ** Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.180]) by smtp.chelsea.net (Postfix) with ESMTP id 356C24E0D for ; Fri, 5 Sep 2008 19:00:57 -0400 (EDT) Received: by wa-out-1112.google.com with SMTP id j4so415728wah.19 for ; Fri, 05 Sep 2008 16:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=jjaSAEdEcWN/QhLYrh8JVPCFZdevNhBJE+UZZdXnpLE=; b=q2K3g7o2qYkiX7ntgPB9kc3GroDp1zIBGuiWjQL4rUCfvKGThE57lrzREoF48gHBtV S3wMlzcBNsQhnXLFQz6tpu/1blW2e9XVu5vzI6PQfP6wd7fmmn/0s/0pUUWlW8scH6UJ q2OJXkc0cZmZa364DbTTJX+w2T+y8DPFppbPs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=AHI+toRlU0Henn+rr8C+Skqz58xuaN+yQu3rGk9mC46KkT/tUlm7foHo5JgL7Iwk3M fLJKokkcQitOFQa1HV599KD/zeASS7P+Vsk7METR8jDuiDtW+4rFrnAFluiDH8KGlxZW msLVRCfsDfDg4PD7qWrTn6dcGGJ/uV10eXoYQ= Received: by 10.114.56.1 with SMTP id e1mr10619359waa.69.1220655656195; Fri, 05 Sep 2008 16:00:56 -0700 (PDT) Received: by 10.114.254.17 with HTTP; Fri, 5 Sep 2008 16:00:56 -0700 (PDT) X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <1b5f39a10809051600r5863c1f5h18e883b75e0f5c75@mail.gmail.com> Date: Fri, 5 Sep 2008 18:00:56 -0500 From: "Jay Sprenkle" To: fastcgi-developers@mailman.fastcgi.com In-Reply-To: <1b5f39a10808252130g4104cccfodfb7d80048f4a241@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1b5f39a10808252130g4104cccfodfb7d80048f4a241@mail.gmail.com> Subject: Re: [FASTCGI] apache 2.2+fastcgi+cgicc X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2008 23:01:04 -0000 Good evening, After much hair pulling I've found my particular bug with fastcgi on Windows Apache and lighttpd. I thought I would share with the community. Any fastcgi binary application compiled with Microsoft (msvc 8, etc) compilers and running against a mod_fastcgi compiled under cygwin with a version of 1.5.24 or earlier will fail. The cygwin libraries do not emulate dup2() in such a way that the duplicated handle is reliably inheritable by a child process. This causes the fastcgi application to fail if it uses a tcp/ip connection for interprocess communication. There's a discussion of the problem here: http://www.nabble.com/Socket-inheritance-with-fork-dup2-exec-td11243160.html Jay Sprenkle From eddie@mailforce.net Sat Sep 6 18:50:14 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.42]) by spam.chelsea.net (Postfix) with ESMTP id AFA596D844 for ; Sat, 6 Sep 2008 18:50:14 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on abe.chelsea.net X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_50, BOTNET, BOTNET_BADDNS, BOTNET_SERVERWORDS,GOOGLE_PORN_LONGER shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: * Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by smtp.chelsea.net (Postfix) with ESMTP id 85B525685 for ; Sat, 6 Sep 2008 18:50:08 -0400 (EDT) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 0F0DA15D3DA for ; Sat, 6 Sep 2008 18:50:08 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 06 Sep 2008 18:50:08 -0400 X-Sasl-enc: RHlEju0by+Vj6wiN4RbwsoGqU31uOsx9nqKT2lTAVF6g 1220741407 Received: from [10.0.9.102] (S010600131090f58d.ed.shawcable.net [68.151.53.123]) by mail.messagingengine.com (Postfix) with ESMTPSA id A60421327B for ; Sat, 6 Sep 2008 18:50:07 -0400 (EDT) From: Eddie To: FastCGI Developers List Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ldSO9QFm8d/6AE/7n5sz" Date: Sat, 06 Sep 2008 16:50:06 -0600 X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-Id: <1220741406.6731.9.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 Subject: [FASTCGI] A C++ FastCGI Library X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list Reply-To: eddie@mailforce.net List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2008 22:50:22 -0000 --=-ldSO9QFm8d/6AE/7n5sz Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hey guys, I have been working on a pure C++ FastCGI library for some time now and have LGPLed it. I've got it up at http://fastcgipp.com for now. Lot's of good documentation and tutorials. I would definitely appreciate any ideas or comments you guys could offer. There are a few issues I am running into that I'm hoping someone could give me some insight into. For one, check out the upload example in the SVN trunk. For two, are there any plans to implement the ability to multiples requests over a single connection in mod_fastcgi? It just seems like there would be so much less overhead doing it that way as opposed to dealing with opening/closing numerous connections for every request. -- Eddie --=-ldSO9QFm8d/6AE/7n5sz Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAkjDCR4ACgkQDzZhV8jFCCteIgCfbiN/c6qhWuCTHVzYB/xsyxr7 oRsAoI+vYdaxyEsi6yIV3Z7Zo0lbtWH/ =z9Hh -----END PGP SIGNATURE----- --=-ldSO9QFm8d/6AE/7n5sz-- From gcwf-fastcgi-developers@m.gmane.org Sun Sep 7 20:05:32 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.36]) by spam.chelsea.net (Postfix) with ESMTP id C0FCD1E32B for ; Sun, 7 Sep 2008 20:05:32 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id 1066857A3 for ; Sun, 7 Sep 2008 20:05:28 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.24] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 276181373 for fastcgi-developers@fastcgi.com; Sun, 07 Sep 2008 20:05:28 -0400 Received: from localhost.localdomain (unknown [209.212.65.33]) by spam.chelsea.net (Postfix) with ESMTP id 94D401E32B for ; Sun, 7 Sep 2008 20:05:28 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on abita.chelsea.net X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, BOTNET, BOTNET_NORDNS, GOOGLE_PORN_LONGER, PINS_GAMBLE_BODY shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: * Received: from ciao.gmane.org ([80.91.229.2] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTPS id 276181344 for fastcgi-developers@fastcgi.com; Sun, 07 Sep 2008 20:05:04 -0400 Received-SPF: pass receiver=real.pins.net; client-ip=80.91.229.2; envelope-from=gcwf-fastcgi-developers@m.gmane.org Received: from root by ciao.gmane.org with local (Exim 4.43) id 1KcUFa-0001bF-Gs for fastcgi-developers@fastcgi.com; Mon, 08 Sep 2008 00:05:02 +0000 Received: from host81-153-214-79.range81-153.btcentralplus.com ([81.153.214.79]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Sep 2008 00:05:02 +0000 Received: from richard_holland by host81-153-214-79.range81-153.btcentralplus.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Sep 2008 00:05:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: fastcgi-developers@fastcgi.com From: Richard Holland Date: Sun, 7 Sep 2008 23:59:33 +0000 (UTC) Lines: 16 X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 81.153.214.79 (Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.8.1.15) Gecko/20080701 SUSE/2.0.0.15-0.1 Firefox/2.0.0.15) Sender: news X-CGP-External-Filter: YES Subject: [FASTCGI] long process c application X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2008 00:05:35 -0000 Hi I am new to FastCGI and wonder if it can help in the following scenario. I am manipulating tape drives using C under linux and I want the things like tape status to be shown on a web page( after a button click) using the application as a CGI. The application fails/times out under CGI as tape processes take ages. Is FastCGI the answer here or do I press on looking at forking/child process etc in C. Regards Richard From tom@streamsense.net Sun Sep 7 23:12:27 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.33]) by spam.chelsea.net (Postfix) with ESMTP id 0ECA31E339 for ; Sun, 7 Sep 2008 23:12:27 -0400 (EDT) Received: from real.pins.net (mail.chelsea.net [209.212.66.16]) by smtp.chelsea.net (Postfix) with ESMTP id 8959F5045 for ; Sun, 7 Sep 2008 23:12:25 -0400 (EDT) Received: from spam.chelsea.net ([209.212.65.24] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 276186977 for fastcgi-developers@fastcgi.com; Sun, 07 Sep 2008 23:12:25 -0400 Received: from localhost.localdomain (unknown [209.212.65.33]) by spam.chelsea.net (Postfix) with ESMTP id 171F11E339 for ; Sun, 7 Sep 2008 23:12:25 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on abita.chelsea.net X-Spam-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_50,BOTNET, BOTNET_NORDNS shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: Received: from moutng.kundenserver.de ([212.227.126.177] verified) by real.pins.net (CommuniGate Pro SMTP 5.2.6) with ESMTP id 276186968 for fastcgi-developers@fastcgi.com; Sun, 07 Sep 2008 23:12:20 -0400 Received-SPF: pass receiver=real.pins.net; client-ip=212.227.126.177; envelope-from=tom@streamsense.net Received: from [192.168.1.64] (78-86-189-130.zone2.bethere.co.uk [78.86.189.130]) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis) id 0ML29c-1KcXAm2YYR-0001hL; Mon, 08 Sep 2008 05:12:17 +0200 X-SMTP-Filter: YES X-Virus-Check: YES X-Virus-Check-Status: OK X-Virus-Found: No Message-ID: <48C4980C.2040803@streamsense.net> Date: Mon, 08 Sep 2008 04:12:12 +0100 From: Thomas Grimshaw User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Richard Holland References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+xVv9+VCYnaFNxdAsN2MPZ9NhyKoNPfpBZjYv bpYnpWvbgre2rFI4uyE93VgBJMNe6Jlsm+y0+CHDPYtRBDsSqr Ue8yGONuFDkp9bSduyiNS/vxH1oLWO7 X-CGP-External-Filter: YES Cc: fastcgi-developers@fastcgi.com Subject: Re: [FASTCGI] long process c application X-BeenThere: fastcgi-developers@mailman.fastcgi.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: FastCGI application development and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2008 03:12:29 -0000 Richard Holland wrote: > The application fails/times out under CGI as tape processes take ages. > That won't be fixed with FastCGI, since it's a webserver timeout, and is nothing to do with the application interface. Such timeouts should be entirely configurable, however, at least in apache and IIS. Tom From eddie@mailforce.net Tue Sep 9 11:24:06 2008 Return-Path: Received: from localhost.localdomain (unknown [209.212.65.37]) by spam.chelsea.net (Postfix) with ESMTP id 847111E1FE for ; Tue, 9 Sep 2008 11:24:06 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on strohs.chelsea.net X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_50,BOTNET, BOTNET_BADDNS, BOTNET_SERVERWORDS, DOC_MAIL_LIST_BODY_DB, GOOGLE_PORN_LONGER shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: * Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by smtp.chelsea.net (Postfix) with ESMTP id EF1B25943 for ; Tue, 9 Sep 2008 11:23:53 -0400 (EDT) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 7486015E86C for ; Tue, 9 Sep 2008 11:23:48 -0400 (EDT) Received: from heartbe