[FASTCGI] Same TCP Socket Descriptor for Two FastCGI Processes

Rob Lemley rclemley at yahoo.com
Sun Aug 19 22:18:37 EDT 2012

fastcgi server is a TCP server which serves FastCGI requests.  Is this
the purpose of your module, or does it also do something else via TCP?

the your fastcgi modules run in separate Linux or Windows processes
(not as threads within the same process), then it doesn't matter if
file descriptors are the same.  File descriptors are private per process.

The answer to your question requires more detailed information about the architecture of your apps, how they are configured, how they are trying to communicate and, perhaps most importantly, the nature of the "unexpected behavior."


> From: Raj Thakur <thakurraj3747 at yahoo.com>
>To: "fastcgi-developers at mailman.fastcgi.com" <fastcgi-developers at mailman.fastcgi.com> 
>Sent: Sunday, August 19, 2012 5:50 AM
>Subject: [FASTCGI] Same TCP Socket Descriptor for Two FastCGI Processes
>   I am using mod_fastcgi with
apache webserver, I have made a module in c which cater fastcgi request and
also act as TCP Server which communicate with some other module-x acting as
client. It works fine when only one such module runs. 
>But when i configure to run another similar
module means fastcgi process, Both the process gets same file descriptors when 
socket(PF_INET,SOCK_STREAM,0) is called and when new connection is accepted
from module-x, which results in unexpected behaviour while sending messages to
>HTTP Configuration
>FastCgiServer /scripts/first.fcgi
-processes 1 
>FastCgiServer /scripts/second.fcgi
-processes 1
>Any one can help please .......
>FastCGI-developers mailing list
>FastCGI-developers at mailman.fastcgi.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.fastcgi.com/pipermail/fastcgi-developers/attachments/20120819/6d11a6bc/attachment.html>

More information about the FastCGI-developers mailing list