<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.web.fastcgi.devel">
    <title>gmane.comp.web.fastcgi.devel</title>
    <link>http://blog.gmane.org/gmane.comp.web.fastcgi.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3239"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3238"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3237"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3236"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3235"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3234"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3233"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3232"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3231"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3230"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3229"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3228"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3227"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3226"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3225"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3224"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3223"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3222"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3221"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3220"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3239">
    <title>Re: (no subject)</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3239</link>
    <description>&lt;pre&gt;Shame is not for you! Be a cool man!.. http://jadecom.net/com.page.php?luzID=41co5
       _______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org
http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers
&lt;/pre&gt;</description>
    <dc:creator>CHENG LIANG</dc:creator>
    <dc:date>2011-10-18T21:07:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3238">
    <title>FCGX_GetParam - certain mutations OK?</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3238</link>
    <description>&lt;pre&gt;Hi All,

Reading the docs for FCGX_GetParam, the notes state "Caller must not 
mutate the result or retain it past the end of this request."

I understand why retaining the results past the end of the request is 
bad. However, I don't understand why it's not possible to perform 
certain mutations on the pointer returned by FCGX_GetParam().

For example, if I'm using FCGX_GetParam to return the query string from 
a request, I might want to URL decode the result.  Since URL decoding 
always results in a string that is the same length or shorter, it seems 
like this should be OK to run directly on the pointer returned by 
FCGX_GetParam.  The alternative is to make a copy of any field that 
requires any mutation (even those that would only end up being 
shorter).  Similarly, if I wanted to tokenize the query string, 
replacing certain chars with nulls ('\0') doesn't seem like it should 
cause problems.

In short,  since we're not mutating *envp, but rather substrings of it 
(that result in a string of equal or lesser length) it seems like 
FCGX_Finish should still properly free the resources and everything 
should be happy.  What am I missing?

Cheers,

Dean
&lt;/pre&gt;</description>
    <dc:creator>Dean Banks</dc:creator>
    <dc:date>2011-10-10T18:46:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3237">
    <title>Re: Possible to initiate HTTP requests via FCGI app?</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3237</link>
    <description>&lt;pre&gt;You are presumably writing an application which serves http requests and
also makes http requests, correct? This is definitely possible with
fast-cgi. Are you developing in C? If so, consider using libcurl
(http://curl.haxx.se/libcurl/) to make your http requests. I have used
libcurl successfully from a fastcgi application in the past. Libcurl is
quite easy to use and has been around for years and provides 2 APIs, an easy
to use synchronous interface and a more complex async interface. It can also
handle protocols beyond http (e.g. ftp, ldap, etc.).

Regards,
Gordon

-----Original Message-----
From: fastcgi-developers-bounces-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org
[mailto:fastcgi-developers-bounces-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org] On Behalf Of Dean
Banks
Sent: Friday, August 26, 2011 5:52 PM
To: fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org
Subject: [FASTCGI] Possible to initiate HTTP requests via FCGI app?

Hi All,

Dumb question--is it possible to initiate an HTTP request (GET/POST) 
from within a FastCGI application?

All of the FCGI development that I've done in the past is based on a 
more traditional browser-initiated request, passing through a webserver 
to a FCGI application server.  In a perfect world, I'd like to add a 
threadto my existing application to do server-to-server GETs.  Is this 
possible?

Cheers,

Dean
_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org
http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers
&lt;/pre&gt;</description>
    <dc:creator>Gordon Colburn</dc:creator>
    <dc:date>2011-08-27T03:44:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3236">
    <title>Possible to initiate HTTP requests via FCGI app?</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3236</link>
    <description>&lt;pre&gt;Hi All,

Dumb question--is it possible to initiate an HTTP request (GET/POST) 
from within a FastCGI application?

All of the FCGI development that I've done in the past is based on a 
more traditional browser-initiated request, passing through a webserver 
to a FCGI application server.  In a perfect world, I'd like to add a 
threadto my existing application to do server-to-server GETs.  Is this 
possible?

Cheers,

Dean
&lt;/pre&gt;</description>
    <dc:creator>Dean Banks</dc:creator>
    <dc:date>2011-08-26T21:52:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3235">
    <title>Re: Manually spawned process and unix domain sockets</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3235</link>
    <description>&lt;pre&gt;How exactly is it failing?


Are you fcntl()'ing anything about named pipe fd?


On Aug 17, 2011, at 9:10 AM, Howard May wrote:


_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org
http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers
&lt;/pre&gt;</description>
    <dc:creator>Tom Bowden</dc:creator>
    <dc:date>2011-08-21T00:07:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3234">
    <title>Re: Manually spawned process and unix domain sockets</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3234</link>
    <description>&lt;pre&gt;
I'm not familiar with light, we use the apache2 fastcgi module's
"External Server", which means that Apache does not start or stop our
fastcgi process, Apache only communicates via the port or domain socket.

To eliminate some factors, I might suggest to make sure your app is
running and the domain socket is created before starting lighttpd.

Also, until you get it working, I would suggest to open the permissions
completely on the domain socket by calling "umask(0)" before calling
FCGX_OpenSocket().

Also, you said it's not working, but that could mean anything.  If you
can give any evidence such as log entries, error messages, and/or just
describe the behavior that you're seeing, then more help might be possible.


#include &amp;lt;sys/stat.h&amp;gt;
        int savedmask = umask(0);
        umask(savedmask);
&lt;/pre&gt;</description>
    <dc:creator>Rob</dc:creator>
    <dc:date>2011-08-17T16:47:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3233">
    <title>Manually spawned process and unix domain sockets</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3233</link>
    <description>&lt;pre&gt;I have the following requirements which I am struggling to meet:

1)       Use UNIX domain sockets (named pipes) to communicate (they are on the same box)
2)       Have a single instance of both lighttpd and myApp running
3)       Have multiple simultaneous requests forwarded from Lighttpd at a time

I have a robust setup which uses TCP connections and works very well. This uses the FCGX API to allow myApp to receive multiple requests simultaneously. All I am trying to do is port this from using tcp connections to using named pipes. But I have as yet failed to make this work.

I have now reverted to a simple test app which I have included below along with my Lighttpd config snipet.
I have set the ownership of everything in a ten mile radius to 'lighttpd'

I would be very grateful for any help or suggestions as to what might be going wrong.

Best Regards

Howard May

P.S. Konstantin, I have BCCed you explicitly as you had previously offered assistance in this area (back in 2009!)


fastcgi.server    = ( "/namedpipetest/" =&amp;gt;
                      (
                        (
                          "socket" =&amp;gt; "/var/tmp/lighttpd/wsi-fastcgi.socket",
                          "check-local" =&amp;gt; "disable"
                        )
                      )
                    )



#include &amp;lt;stdio.h&amp;gt;
#include "fcgiapp.h"

void main(int argc, char ** argv)
{
  int fd;
  int result;
  FCGX_Request req;
  printf("Fastcgi FIFO test app\n");
  result = FCGX_Init();
  if(result != 0)
  {
    printf("FCGX_Init returned %d\n", result);
    return;
   }
  fd = FCGX_OpenSocket("/var/tmp/lighttpd/wsi-fastcgi.socket", 16);
  if(fd == 0)
  {
    printf("FCGX_OpenSocket returned 0\n");
    return;
  }
  FCGX_InitRequest(&amp;amp;req, fd, 0);

  while((result = FCGX_Accept_r(&amp;amp;req))==0);
  {
    FCGX_FPrintF(req.out, "Content-type: text/html\r\n\r\n&amp;lt;TITLE&amp;gt;Whoop&amp;lt;/TITLE&amp;gt;\n");
  }
  printf("FCGX_Accept_r returned %d\n", result);
  return;
}


_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org
http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers
&lt;/pre&gt;</description>
    <dc:creator>Howard May</dc:creator>
    <dc:date>2011-08-17T14:10:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3232">
    <title>Re: How to detect closed connection</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3232</link>
    <description>&lt;pre&gt;
We usually detect this when FCGX_PutStr() returns -1.  In this case,
FCGX_GetError() returns the reason as a system errno (on Linux, errno
104 'Connection reset by peer').

I don't know about the reliability of FCGX_GetError() if you did not
detect an error return code from an FCGX_* function.

&lt;/pre&gt;</description>
    <dc:creator>Rob</dc:creator>
    <dc:date>2011-07-12T15:26:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3231">
    <title>How to detect closed connection</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3231</link>
    <description>&lt;pre&gt;_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org
http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers
&lt;/pre&gt;</description>
    <dc:creator>Dean Banks</dc:creator>
    <dc:date>2011-07-12T14:40:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3230">
    <title>Dev Mailing List</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3230</link>
    <description>&lt;pre&gt;Folks,

I think the mailing lists and archives are all fixed up now.  I also 
opened the archives up so they can be Google-searched (thanks to the 
person who pointed that out).  The wiki and web site will be migrating 
shortly as well as soon as I get a chance to finish setting up and 
securing httpd and the Drupal stuff.

   http://mailman.fastcgi.com

Should be the right URL (and properly propagate now as well).

Cheers,

David.
&lt;/pre&gt;</description>
    <dc:creator>David Birnbaum</dc:creator>
    <dc:date>2011-05-18T14:40:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3229">
    <title>Re: Trying to use FastCGI to run PHP as UID of file owner</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3229</link>
    <description>&lt;pre&gt;
Resolved - php 5.3.3 must be configured with --enable-fpm (FastCGI Process
Manager).
&lt;/pre&gt;</description>
    <dc:creator>Henry C.</dc:creator>
    <dc:date>2011-05-06T12:33:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3228">
    <title>Re: Trying to use FastCGI to run PHP as UID of file owner</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3228</link>
    <description>&lt;pre&gt;
Presumably this must be the user/group who owns the PHP files in question?


Thanks - yes, these were detritus from the original config.  I'll remove them.


I suspect this is where the real problem is.  Unfortunately on this particular
server I have to compile the PHP binary from source (it's not
centos/debian/etc where I can simply yum install php-cgi/apt-get install
php-cgi, etc).

So, for PHP-5.3.3 source, how do I compile it to 'talk' the fastcgi protocol? 
Is it different to standard CGI?  Sadly, php 5.3.3 does not seem to have a
--with-fastcgi directive for ./configure).  Is there a fastcgi patch or
something for PHP 5.3.x?

Thanks
Henry
&lt;/pre&gt;</description>
    <dc:creator>Henry C.</dc:creator>
    <dc:date>2011-05-05T14:10:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3227">
    <title>Re: Trying to use FastCGI to run PHP as UID of file owner</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3227</link>
    <description>&lt;pre&gt;Henry,

You appear to be missing the User/Group Apache directives.  Also, the 
php_ directives won't work if you're running the PHP binary from Apache 
directly, I don't think (as opposed to mod_php).  Finally, are you 
running the php-cgi binary (instead of the php binary?)  There's two 
different ones now.

David.

-----

On 5/5/11 7:36 AM, Henry C. wrote:
&lt;/pre&gt;</description>
    <dc:creator>David Birnbaum</dc:creator>
    <dc:date>2011-05-05T13:31:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3226">
    <title>Trying to use FastCGI to run PHP as UID of file owner</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3226</link>
    <description>&lt;pre&gt;Hi there,

PHP:  5.3.3
Apache: 2.2.17
mod_fastcgi: 2.4.6

I'm trying out FastCGI for the first time, so please forgive my ignorance.

Basically, I'm trying to use FastCGI to run PHP scripts as the UID/owner of
the script itself, not the default apache 'nobody'/etc.

I must be missing a few things because I'm running into a few problems and
would appreciate *any* pointers.

Here's my apache config for a virtual host:

&amp;lt;VirtualHost ...&amp;gt;
 &amp;lt;IfModule mod_fastcgi.c&amp;gt;
  FastCgiServer /www/virtual/abc.com/cgi-bin/php
  AddHandler php-fastcgi .php
  SetHandler fastcgi-script
  Action php-fastcgi /cgi-bin/php
  AddType application/x-httpd-php .php
  &amp;lt;Directory /www/virtual/abc.com/htdocs&amp;gt;
      Options +ExecCGI
  &amp;lt;/Directory&amp;gt;
 &amp;lt;/IfModule&amp;gt;
 php_flag engine off
 Options +IncludesNOEXEC -Indexes +FollowSymLinks
 ServerAdmin webmaster-GXcTff7tL0M&amp;lt; at &amp;gt;public.gmane.org
 DocumentRoot /www/virtual/abc.com/htdocs/index.html  # or without index.html
 php_admin_value open_basedir /www/virtual/abc.com/htdocs:/tmp
 php_admin_value display_errors on
 ServerName www.abc.com
 ServerAlias abc.com
 ErrorLog /www/virtual/abc.com/logs/error_log
 TransferLog /www/virtual/abc.com/logs/access_log
 ScriptAlias /cgi-bin/ /www/virtual/abc.com/cgi-bin/
&amp;lt;/VirtualHost&amp;gt;

/cgi-bin/php file:
------------------
#!/bin/sh

PHPRC="/usr/local/php5/lib"
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
exec /usr/local/php5/bin/php

/cgi-bin/php is +x (executable) owned by root.

Test PHP script: /htdocs/1.php is owned by UID/GID 20964:2374 (ie, not the
apache user).  Perms are 775 (-rwxrwxr-x).

If I browse to abc.com/1.php it hangs for 30s, producing this error in the logs:

FastCGI: comm with (dynamic) server "/www/virtual/abc.com/htdocs/1.php"
aborted: (first read) idle timeout (30 sec)
FastCGI: incomplete headers (0 bytes) received from server
"/www/virtual/abc.com/htdocs/1.php"

It's almost as if /cgi-bin/php is not being fed the 1.php file and it's
waiting for input from stdin (which is what the php CLI binary does if you run
it without args).  It then times out waiting for input, producing the error
above.

I've configured/compiled PHP 5.3.3 with/without '--with-fastcgi' (even though
./configure --help does not show --with-fastcgi as being available).

I used 'top_dir = /.../apache/httpd-2.2.17' in the Makefile for
mod_fastcgi-2.4.6.  Your site talks about a php binary version which talks the
FastCGI protocol, so I'm not sure whether my PHP binary is compiled correctly
to work with FastCGI (the binary produced appears to be the same with/without
'--with-fastcgi, so this might be a factor).

Also, since this setup is intended for a customer, and they only have FTP
access to update their site, with CHMOD disabled, is there any way to do this
without having to make the PHP script executable?  If I turn off the
executable bit, then I get the "execute not allowed" (for uid 99, gid 99, ie,
the apache user) error which I suppose is expected.

A side-effect of all this is that I cannot even browse to an HTML file
(index.html) - it produces the error:

FastCGI: invalid (dynamic) server "/www/virtual/abc.com/htdocs/index.html":
access for server (uid 99, gid 99) not allowed: execute not allowed

Or it tries to execute the htdocs/ directory if I leave out the index.html for
DocumentRoot:

FastCGI: invalid (dynamic) server "/www/virtual/abc.com/htdocs/": script is a
directory!

I hope I've made sense in the above.  Any assistance/pointers would be
appreciated.  btw, it's a pity this mailing list is not open to google, else
I'd be able to search it for suggestions...

regards
Henry
&lt;/pre&gt;</description>
    <dc:creator>Henry C.</dc:creator>
    <dc:date>2011-05-05T11:36:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3225">
    <title>Re: multiple connections to a fastcgi server</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3225</link>
    <description>&lt;pre&gt;Hi Marc,

I have a multithreaded fastcgi app that handles multiple requests as 
expected.  I modeled it after the threaded.c example in the SDK as well, 
though I changed to make the FCGX_Accept_r() call non-blocking  (mostly 
so that I could gracefully exit the whole app with SIGINT).

In your application, FCGX_Accept_r() blocks until an incoming request is 
passed from the webserver to your application.  Provided that you have a 
separate context for each thread (as the example shows), you should be 
multithreading properly.  One way to test this might be to use two 
threads, but only sleep if the thread number is 0.  If you open two 
browsers, you should be able to make a request to the first (held up by 
sleep()) and still get active responses from the second broswer (the 
available thread).

Please feel free to post any other questions.  This list is sleepy, but 
has lots of helpful folks lurking.

Cheers,

Dean
&lt;/pre&gt;</description>
    <dc:creator>Dean Banks</dc:creator>
    <dc:date>2011-05-05T02:25:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3224">
    <title>multiple connections to a fastcgi server</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3224</link>
    <description>&lt;pre&gt;Hello,

I want to build a fast cgi server application which can handles long
polling calls. There should be only one process of this fast cgi app
which handles all incoming requests.
I wrote an app which is similar to the threaded.c example in the fast
cgi sdk. (http://www.fastcgi.com/devkit/examples/threaded.c)
Before responding, my app will wait a certain time after an incoming
request. (For testing I only put a sleep() call above
FCGX_FPrintF(...) in threaded.c).
I tested with Lighttpd und nginx and got the same result: The second
call is blocked until the first one is finished. I think the method
FCGX_Accept_r(&amp;amp;request); blocks until FCGX_Finish_r(&amp;amp;request); is
called.
Does anyone has a running multithread fastcgi app?

Thanks
Marc
&lt;/pre&gt;</description>
    <dc:creator>mscherer82-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2011-05-03T13:58:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3223">
    <title>Re: Cannot allocate memory</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3223</link>
    <description>&lt;pre&gt;Thanks Jay Sprenkle... i will buy more memory.. before that i want to know
is there any issue in these settings?

On Mon, Apr 25, 2011 at 12:17 PM, Nidhin M D &amp;lt;nidhin-YzedMhmJjC9Wk0Htik3J/w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
&lt;/pre&gt;</description>
    <dc:creator>Nidhin M D</dc:creator>
    <dc:date>2011-04-26T05:51:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3222">
    <title>Cannot allocate memory</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3222</link>
    <description>&lt;pre&gt;Hi


Please help me to fix this issue.


[Wed Apr 20 14:28:39 2011] [notice] mod_fcgid: call /var/www/vhosts/
domain.com/httpdocs/index.php&amp;lt;http://webdevassistant.co.uk/httpdocs/index.php&amp;gt;with
wrapper /usr/bin/php-cgi

[Wed Apr 20 14:28:39 2011] [error] (12)Cannot allocate memory: mod_fcgid:
can't create wrapper process for
/var/www/vhosts/domain/httpdocs/index.php&amp;lt;http://webdevassistant.co.uk/httpdocs/index.php&amp;gt;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Site hosted with plesk control.


Below is the server settings.


vi /etc/httpd/conf.d/fcgid.conf


 added by psa-mod-fcgid-configurator
LoadModule fcgid_module /usr/lib64/httpd/modules/mod_fcgid.so

&amp;lt;IfModule mod_fcgid.c&amp;gt;
  SocketPath /var/lib/httpd/fcgid/sock
&amp;lt;/IfModule&amp;gt;

# added by psa-mod-fcgid-configurator
&amp;lt;IfModule mod_fcgid.c&amp;gt;
  IdleTimeout 36000
  ProcessLifeTime 7200
  MaxProcessCount 64
  DefaultMaxClassProcessCount 8
  IPCConnectTimeout 300
  IPCCommTimeout 450
  DefaultInitEnv RAILS_ENV production
&amp;lt;/IfModule&amp;gt;


For solving some other issue with fcgid, created a new vhost.conf and
vhost_ssl.conf then added below entries to files.


&amp;lt;IfModule mod_fcgid.c&amp;gt;
SocketPath /var/lib/httpd/fcgid/sock
IdleTimeout 3600
ProcessLifeTime 7200
MaxProcessCount 1000
DefaultMinClassProcessCount 3
DefaultMaxClassProcessCount 100
IPCConnectTimeout 8
IPCCommTimeout 600
BusyTimeout 300
&amp;lt;/IfModule&amp;gt;


All these settings done before 2- 3 months. Drupal is used for building the
sites. But now i'm getting errors i posted above.

Total memory - Mem:   1984536k total

Please help.


Regards

Nidhin M D
_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
&lt;/pre&gt;</description>
    <dc:creator>Nidhin M D</dc:creator>
    <dc:date>2011-04-25T06:47:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3221">
    <title>Re: Looking for help configuring an application server</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3221</link>
    <description>&lt;pre&gt;Increasing the number of processes may or may not help; since you only 
have two cores, you can't actually run that many things at once.

If this is set up as a static FastCGI app, check the timouts/timers and 
make sure that they are high enough to allow for the latency.  Also, 
watch the box under load and make sure you aren't thrashing CPU, memory, 
or disk so that your child count is tuned as well as possible.

Cheers,

David.

-----

On 4/21/11 8:32 PM, furroy wrote:
_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
&lt;/pre&gt;</description>
    <dc:creator>David Birnbaum</dc:creator>
    <dc:date>2011-04-22T02:02:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3220">
    <title>Looking for help configuring an application server</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3220</link>
    <description>&lt;pre&gt;I have a dedicated application server. Whenever I push out an update to my
product, there's a massive spike demand of PHP calls and it starts getting
the dreaded 502 errors.  I'm trying to figure out the best way to configure
this box to avoid these at all costs.  It's fine if the box gets bogged down
and it just just takes longer to process the requests, speed isn't a big
deal for this application, but getting back 502's causes me great pain on
the front end.

RAM: *4 GB*, Disk: *500 GB*
 CPUs: *1 (2 cores/CPU) &amp;lt; at &amp;gt;2.2GHz

*I cranked up PHP_FCGI_CHILDREN = 128 for my last test.  I don't care how
much RAM this takes up (~3.5G), this box is solely dedicated to this
service, there's nothing else running on it.   It still returned ~5500 502
errors during my load test.
*
*

Running nginx 0.8.53

PHP 5.2.15 (cli) (built: Dec 15 2010 14:09:31)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend
Technologies
    with XCache v1.2.2, Copyright (c) 2005-2007, by mOo
    with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend
Technologies
_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
&lt;/pre&gt;</description>
    <dc:creator>furroy</dc:creator>
    <dc:date>2011-04-22T00:32:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3219">
    <title>libfcgi with fd &gt; 1024</title>
    <link>http://permalink.gmane.org/gmane.comp.web.fastcgi.devel/3219</link>
    <description>&lt;pre&gt;I am using Lighttpd with a fastCGI client using libfcgi on Linux. If Lighttpd opens more than 1024 tcp connections it seems that libfcgi fails and I believe this is on account of using 'select' with the default FD_SETSIZE value of 1024.

My question is whether this is a known issue with a tried and tested work around.
Note: my application is required to support more than 1024 simultaneous HTTP requests.

Best regards

Howard May
_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR&amp;lt; at &amp;gt;public.gmane.org
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
&lt;/pre&gt;</description>
    <dc:creator>Howard May</dc:creator>
    <dc:date>2011-04-21T08:48:06</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.web.fastcgi.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.web.fastcgi.devel</link>
  </textinput>
</rdf:RDF>

