From ninive at gmx.at Sat May 2 17:13:17 2009 From: ninive at gmx.at (double) Date: Sat, 02 May 2009 23:13:17 +0200 Subject: [FASTCGI] mod_fastcgi buffersize Message-ID: <49FCB76D.8030304@gmx.at> Hello, A FastCGI application creates a website, and the content size is below e.g. 100k. Let's image, the client has a slow dialup-connection. Will, in this case, the FastCGI application be blocked until the website is entirely transfered to the client? Or is this website buffered by the webserver and the FastCGI application can process a different request? Thanks Marcus From rasmus at flajm.com Sun May 3 07:03:39 2009 From: rasmus at flajm.com (Rasmus Andersson) Date: Sun, 3 May 2009 13:03:39 +0200 Subject: [FASTCGI] mod_fastcgi buffersize In-Reply-To: <49FCB76D.8030304@gmx.at> References: <49FCB76D.8030304@gmx.at> Message-ID: Totally depends on the implementation. FastCGI is merely a protocol and a C library implementation of that protocol. How you handle the kind of I/O you're talking about is outside of the scope of this list. But there are basically three models: 1. blocking I/O, single thread This model handles one request in sequential order. That means if request 1 takes 4 seconds to process, request 2 will have to wait for up to 4 seconds. 2. non-blocking/asynchronous I/O, single thread This popular model builds on the idea that I/O is the bottle neck, not the CPU. Handles multiple requests at once but code will never execute concurrently. 3. blocking or non-blocking I/O in multiple threads of control Consumes more memory, context switches and CPU than model 2 but is much easier to implement and provides the same features, except from that in a well-designed application, code can execute concurrently. If your model is 1. you have a problem (unless there are multiple processes running, which is probably the case if you are running PHP). If your model is 2. and you use blocking I/O (for instance from other libraries, like database clients) you have a problem (unless multiple processes, but then you would probably want to use model 1.). On Sat, May 2, 2009 at 23:13, double wrote: > Hello, > > A FastCGI application creates a website, and the content > size is below e.g. 100k. > Let's image, the client has a slow dialup-connection. Will, > in this case, the FastCGI application be blocked until the > website is entirely transfered to the client? Or is this  website > buffered by the webserver and the FastCGI application can > process a different request? > > Thanks > Marcus > > _______________________________________________ > FastCGI-developers mailing list > FastCGI-developers at mailman.fastcgi.com > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers > -- Rasmus Andersson From vonderwueste at yahoo.com Sun May 3 18:13:02 2009 From: vonderwueste at yahoo.com (Andrew Vonderwueste) Date: Sun, 3 May 2009 15:13:02 -0700 (PDT) Subject: [FASTCGI] perl lighttpd.conf Message-ID: <739032.90433.qm@web111208.mail.gq1.yahoo.com> I am new to fastcgi and lighttpd and am unable to find a good example of a lighttpd.conf file set up for multiple perl fcgi scripts. My current test setup is: fastcgi.server = ( ".fcgi" =>         (( "socket" => "/tmp/application.fcgi.socket",         "bin-path" => "/var/www/html/site1/fcgi/script1.fcgi",         )) ) Adding another script or two must be simple, but I have been unable to get it right. Any help would be greatly appreciated. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From unique at idempot.net Sun May 3 23:57:36 2009 From: unique at idempot.net (Matthew Weigel) Date: Sun, 03 May 2009 22:57:36 -0500 Subject: [FASTCGI] perl lighttpd.conf In-Reply-To: <739032.90433.qm@web111208.mail.gq1.yahoo.com> References: <739032.90433.qm@web111208.mail.gq1.yahoo.com> Message-ID: <49FE67B0.5020900@idempot.net> Andrew Vonderwueste wrote: > I am new to fastcgi and lighttpd and am unable to find a good example of > a lighttpd.conf file set up for multiple perl fcgi scripts. > > My current test setup is: > > fastcgi.server = ( "..fcgi" => > > (( "socket" => "/tmp/application.fcgi.socket", > "bin-path" => "/var/www/html/site1/fcgi/script1.fcgi", > )) > ) > > Adding another script or two must be simple, but I have been unable to > get it right. Any help would be greatly appreciated. Thanks. First... I assume the "..fcgi" is a typo in copying your config? After that, it looks like the problem you might be having is that all .fcgi requests get sent to script1.fcgi; the way you've configured lighttpd, all GET requests that end in ".fcgi" are being routed to the FastCGI started from the bin-path there. PHP handles this in a very different manner, which might be what you're expecting: the PHP interpreter itself speaks FastCGI and executes the scripts without anything in the script knowing the difference. An individual Perl script can speak FastCGI, but the perl binary itself doesn't run as a daemon serving requests. So, each fastcgi.server that you specify has to correspond to an individual Perl script acting as a FastCGI server, and you're better off partitioning part of the URL namespace (like http://www.example.com/application1/ and everything under it) for each script that runs. Hope that helps! -- Matthew Weigel hacker unique & idempot . ent From johann.seydoux at netplus.ch Mon May 4 10:32:53 2009 From: johann.seydoux at netplus.ch (Johann Seydoux) Date: Mon, 04 May 2009 16:32:53 +0200 Subject: [FASTCGI] CGI vs FastCGI Message-ID: <49FEFC95.5050102@netplus.ch> Hi, I have to develop an C++ application that will be used on a web server and to choose the most performant interface between CGI and FastCGI. Therefore I've done a trivial performance test with an simple "hello world" application to compare both interfaces. I've made the test with this configuration : * Intel Core 2 Duo E8400 @ 3.00Ghz * 256Mb RAM * Linux version 2.6.26-2-686 (Debian 2.6.26-15) * lighttpd-1.4.19 (ssl) * ApacheBench v2.3 The Lighttpd config is the default config and I've loaded mod_cgi and mod_fastcgi. Only one process is running for FastCGI. The results of the test (running on localhost) with 1000 requests and a concurrency of 10 are : * 5000 req/s with FastCGI module * 100 req/s with CGI module. Can I trust these results (big difference)? Has someone already done a performance test between these two interfaces? And how were the results? Thanks for your answers. From vincenzo.romano at notorand.it Mon May 4 10:51:12 2009 From: vincenzo.romano at notorand.it (Vincenzo Romano) Date: Mon, 04 May 2009 16:51:12 +0200 Subject: [FASTCGI] CGI vs FastCGI In-Reply-To: <49FEFC95.5050102@netplus.ch> References: <49FEFC95.5050102@netplus.ch> Message-ID: <1241448672.5103.14.camel@g1s> I would advise you towards real-world performance tests, though. The design differences between the two approaches is quite small, so you can try your very application with both. In general, unless poor programming techniques get involved, FastCGI yields to (much) better results than CGI (with no test at all) at least because: 1. process start up fee is paid only once (scheduler resources allocation); 2. application initialisation and finalisation fees are paid only once (system resources, like DB connections and file descriptors, get acquired and released not for every request) But I wish to warn you that: 3. Even small memory leaks can lead to disasters in FastCGI; 4. The resource clean up among requests is to be designed and implemented very carefully, otherwise it will cost more than a process start up. The only case in which I would use CGI is with very limited computing resources that make a persistent process not viable. But it seems this is not your case. On Mon, 2009-05-04 at 16:32 +0200, Johann Seydoux wrote: > Hi, > > I have to develop an C++ application that will be used on a web server > and to choose the most performant interface between CGI and FastCGI. > Therefore I've done a trivial performance test with an simple "hello > world" application to compare both interfaces. > > I've made the test with this configuration : > > * Intel Core 2 Duo E8400 @ 3.00Ghz > * 256Mb RAM > * Linux version 2.6.26-2-686 (Debian 2.6.26-15) > * lighttpd-1.4.19 (ssl) > * ApacheBench v2.3 > > The Lighttpd config is the default config and I've loaded mod_cgi and > mod_fastcgi. Only one process is running for FastCGI. > > The results of the test (running on localhost) with 1000 requests and a > concurrency of 10 are : > > * 5000 req/s with FastCGI module > * 100 req/s with CGI module. > > Can I trust these results (big difference)? Has someone already done a > performance test between these two interfaces? And how were the results? > > Thanks for your answers. > > _______________________________________________ > FastCGI-developers mailing list > FastCGI-developers at mailman.fastcgi.com > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers -- Vincenzo Romano NotOrAnd Information Technologies cel. +39 339 8083886 | gtalk. vincenzo.romano at notorand.it fix. +39 0823 454163 | skype. notorand.it fax. +39 02 700506964 | msn. notorand.it From terius at villasana.com.mx Wed May 20 11:27:33 2009 From: terius at villasana.com.mx (terius at villasana.com.mx) Date: Wed, 20 May 2009 10:27:33 -0500 (CDT) Subject: [FASTCGI] Install problem Message-ID: Hello I am trying to make php4 and php5 work together, php4 as module and php5 with fastcgi, but I am getting a problem that when I run a php5 page, it says that fastcgi exits with code 0 and restarts Can someone help me please I need to have this working asap. Thanks From d.stcyr at streamfoundry.com Wed May 20 14:50:12 2009 From: d.stcyr at streamfoundry.com (Dan StCyr - StreamFoundry) Date: Wed, 20 May 2009 14:50:12 -0400 Subject: [FASTCGI] fcgi_config.slo error in 'make' Message-ID: <548A24E8FE15434D9D00FAD4772772BE@STCYR> Hello: I have the following problem trying to install mod_fastcgi-2.4.6 on Apache2 running under Suse Linux Enterprise Server 10. Using instructions in INSTALL.AP2, after changing top_dir to /usr/share/apache2 in Makefile.AP2, getting an error in the make as follows. Help/suggestions would be appreciated. # cd /home/dstcyr/mod_fastcgi-2.4.6 # cp Makefile.AP2 Makefile # make /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -O2 -fmessage-length=0 -Wall -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_DEBUG -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1 -prefer-pic -c mod_fastcgi.c && touch mod_fastcgi.slo mod_fastcgi.c: In function create_fcgi_request: mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type mod_fastcgi.c:2487: warning: passing argument 1 of ap_strrchr discards qualifiers from pointer target type /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -O2 -fmessage-length=0 -Wall -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_DEBUG -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1 -prefer-pic -c fcgi_pm.c && touch fcgi_pm.slo /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -O2 -fmessage-length=0 -Wall -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_DEBUG -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1 -prefer-pic -c fcgi_util.c && touch fcgi_util.slo /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -O2 -fmessage-length=0 -Wall -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_DEBUG -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1 -prefer-pic -c fcgi_protocol.c && touch fcgi_protocol.slo fcgi_protocol.c: In function fcgi_protocol_dequeue: fcgi_protocol.c:449: warning: format %d expects type int, but argument 9 has type long unsigned int /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -O2 -fmessage-length=0 -Wall -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_DEBUG -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1 -prefer-pic -c fcgi_buf.c && touch fcgi_buf.slo /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -O2 -fmessage-length=0 -Wall -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_DEBUG -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1 -prefer-pic -c fcgi_config.c && touch fcgi_config.slo In file included from fcgi_config.c:11: /usr/include/apache2/mpm_common.h:46:17: error: mpm.h: No such file or directory fcgi_config.c: In function get_host_n_port: fcgi_config.c:43: warning: passing argument 1 of ap_strchr discards qualifiers from pointer target type fcgi_config.c: In function fcgi_config_new_static_server: fcgi_config.c:769: warning: format %ld expects type long int, but argument 3 has type gid_t fcgi_config.c:774: warning: format %ld expects type long int, but argument 3 has type uid_t fcgi_config.c: In function fcgi_config_new_external_server: fcgi_config.c:962: warning: format %ld expects type long int, but argument 3 has type gid_t fcgi_config.c:967: warning: format %ld expects type long int, but argument 3 has type uid_t fcgi_config.c: In function fcgi_config_new_auth_server: fcgi_config.c:1207: warning: cast from pointer to integer of different size make: *** [fcgi_config.slo] Error 1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ricsal at gmail.com Sun May 24 12:36:55 2009 From: ricsal at gmail.com (Ricardo Sal) Date: Sun, 24 May 2009 17:36:55 +0100 Subject: [FASTCGI] looking for a tcp dump of fastcgi Message-ID: <3f9606c30905240936m19612962s235f093606470c72@mail.gmail.com> I started yesterday on mad :) quest to implement fastcgi in a very simple web server (programed in script language). I am already aware on how to use normal cgi, since i have implemented it already. Naturally with these the combined factors, the speed is really slow. I found already a lot of docs describing the protocol, but i tend to be an example guy that is why i am contacting you (since all dumps found were very incomplete). I was looking for a full tcp dump of a full fastcgi communication (of any php page) with ethereal/wire-shark or any other program and i was hoping one of you could provide that to me. Many thanks in advance for the patience :) Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From velisungutay at gmail.com Sun May 24 20:30:42 2009 From: velisungutay at gmail.com (Veli Ogla Sungutay) Date: Mon, 25 May 2009 03:30:42 +0300 Subject: [FASTCGI] FastCGI + lighthttpd for Adobe AIR Message-ID: <9da0760f0905241730r1405f666ucda57aea0464108f@mail.gmail.com> Hi all, I'm sure you guys are familiar with Adobe's Desktop runtime AIR. Think of it as the Flash Player working on the desktop with access to the filesystem. We can build fancy desktop user interfaces. The problem is that we cannot extend it with C/C++ libs. So I've been experimenting ways for communication between AIR and C libraries. I think a good strategy would be to use a XML Socket server. But do you think FastCGI + lighthttpd would also be a good solution? It will act as an application server for a AIR desktop application. They will all reside in the same desktop machine. I appreciate your feedback, thanks! -- Veli Sungutay http://www.lyciasoft.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From akatraga at gmail.com Mon May 25 08:58:54 2009 From: akatraga at gmail.com (Anil Katragadda) Date: Mon, 25 May 2009 08:58:54 -0400 Subject: [FASTCGI] Configuration needed for fastcgi setup on lighttpd 1.5 Message-ID: <92b8e1170905250558j6929088fo3d045e6594a4c05e@mail.gmail.com> Hi, I am trying to setup fastcgi configuration on lighttpd 1.5.x . As the older mod_proxy and mod_fastcgi were replaced in lighttpd 1.5.x with mod_proxy_core, the old configuration of lighttpd 1.4, won't work. My old configuration in 1.4.x was looking something like this. fastcgi.debug = 0 fastcgi.server = ( ".fcgi" => ( "grisu" => ( "host" => "x.x.x.x", "port" => 11000, "bin-path" => env.SRCDIR + "/tmp/mybin", "check-local" => "disable", "max-procs" => 1, "min-procs" => 1 ) ) ) Can anyone help me with a sample fastcgi configuration for lighttpd 1.5? Please note that my requirement for fastcgi is not for .php, but for C language binary files. All the examples in lighttpd mod_proxy_core are for setting up '.php' with fastcgi, but none of them are for C binaries. I appreciate your help. Thanks, AK -------------- next part -------------- An HTML attachment was scrubbed... URL: From ninive at gmx.at Thu May 28 04:19:33 2009 From: ninive at gmx.at (double) Date: Thu, 28 May 2009 10:19:33 +0200 Subject: [FASTCGI] terminated due to uncaught signal '11' Message-ID: <4A1E4915.5050200@gmx.at> Hello, Every 5 seconds I have this strange message in my errorlog, mod_fastcgi (mostly signal '11', sometimes signal '15'): [Thu May 28 07:58:07 2009] [warn] FastCGI: (dynamic) server "/home/cgi-bin/index.cgi" restarted (pid 23217) [Thu May 28 07:58:07 2009] [warn] FastCGI: (dynamic) server "/home/cgi-bin/index.cgi" (pid 23217) termination signaled [Thu May 28 07:58:07 2009] [warn] FastCGI: (dynamic) server "/home/cgi-bin/index.cgi" (pid 23217) terminated due to uncaught signal '11' (Segmentation fault) [Thu May 28 07:58:12 2009] [warn] FastCGI: (dynamic) server "/home/cgi-bin/index.cgi" restarted (pid 23221) [Thu May 28 07:58:13 2009] [warn] FastCGI: (dynamic) server "/home/cgi-bin/index.cgi" (pid 23221) termination signaled [Thu May 28 07:58:13 2009] [warn] FastCGI: (dynamic) server "/home/cgi-bin/index.cgi" (pid 23221) terminated due to uncaught signal '15' (Terminated) The first lines of my "main()" are: signal( SIGTERM, signal_handler ); signal( SIGSEGV, signal_handler ); Is there a known solution for this issue? Thank you very much Markus -------------- next part -------------- An HTML attachment was scrubbed... URL: