Re: Same TCP Socket Descriptor for Two FastCGI Processes
Rob Lemley <rclemley-/[email protected]> Sun, 19 Aug 2012 19:18:37 -0700 (PDT)
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============4685247794588044368== Content-Type: multipart/alternative; boundary="640426125-1147443023-1345429117=:9917" --640426125-1147443023-1345429117=:9917 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable A=0Afastcgi server is a TCP server which serves FastCGI requests.=A0 Is thi= s=0Athe purpose of your module, or does it also do something else via TCP?= =0A=0A=0AIf=0Athe your fastcgi modules run in separate Linux or Windows pro= cesses=0A(not as threads within the same process), then it doesn't matter i= f=0Afile descriptors are the same.=A0 File descriptors are private per proc= ess.=0A=0A=0AThe 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 "un= expected behavior."=0A=0A=0ARob=0A=0A=0A=0A=0A>____________________________= ____=0A> From: Raj Thakur <thakurraj3747-/[email protected]>=0A>To: "fastcgi-develop= [email protected]" <fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org> =0A>Sent:= Sunday, August 19, 2012 5:50 AM=0A>Subject: [FASTCGI] Same TCP Socket Desc= riptor for Two FastCGI Processes=0A> =0A>=0A>Hi,=0A>=A0=0A>=A0=A0 I am usin= g mod_fastcgi with=0Aapache webserver, I have made a module in c which cate= r fastcgi request and=0Aalso act as TCP Server which communicate with some = other module-x acting as=0Aclient. It works fine when only one such module = runs. =0A>=A0=0A>But when i configure to run another similar=0Amodule means= fastcgi process, Both the process gets same file descriptors when=A0=0Asoc= ket(PF_INET,SOCK_STREAM,0) is called and when new connection is accepted=0A= from module-x, which results in unexpected behaviour while sending messages= to=0Amodule-x.=0A>=A0=0A>HTTP Configuration=0A>=A0=0A>FastCgiServer /scrip= ts/first.fcgi=0A-processes 1 =0A>FastCgiServer /scripts/second.fcgi=0A-proc= esses 1=0A>=A0=0A>Any one can help please .......=0A>=A0=0A>Thanks,=0A>Raj= =0A>_______________________________________________=0A>FastCGI-developers m= ailing list=0A>FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org=0A>http://mailman.fas= tcgi.com/mailman/listinfo/fastcgi-developers=0A>=0A>=0A> --640426125-1147443023-1345429117=:9917 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable <html><body><div style=3D"color:#000; background-color:#fff; font-family:ar= ial, helvetica, sans-serif;font-size:10pt"><div><span>A=0Afastcgi server is= a TCP server which serves FastCGI requests. Is this=0Athe purpose of= your module, or does it also do something else via TCP?<br></span></div><d= iv><br>If=0Athe your fastcgi modules run in separate Linux or Windows proce= sses=0A(not as threads within the same process), then it doesn't matter if= =0Afile descriptors are the same. File descriptors are private per pr= ocess.<br>=0A</div>=0A<div><br>=0A</div>=0A<div>The answer to your question= requires more detailed information about the architecture of your apps, ho= w they are configured, how they are trying to communicate and, perhaps most= importantly, the nature of the "unexpected behavior."<br>=0A</div>=0A<div>= <br>=0A</div>=0A<div>Rob</div><div><br></div><div><br><blockquote style=3D"= border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px;= padding-left: 5px;"> <div style=3D"font-family: arial,helvetica,sans-seri= f; font-size: 10pt;"> <div style=3D"font-family: times new roman,new york,t= imes,serif; font-size: 12pt;"> <div dir=3D"ltr"> <font face=3D"Arial" size= =3D"2"> <hr size=3D"1"> <b><span style=3D"font-weight: bold;">From:</span>= </b> Raj Thakur <thakurraj3747-/[email protected]><br> <b><span style=3D"font-= weight: bold;">To:</span></b> "fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org" <= fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org> <br> <b><span style=3D"font-weig= ht: bold;">Sent:</span></b> Sunday, August 19, 2012 5:50 AM<br> <b><span st= yle=3D"font-weight: bold;">Subject:</span></b> [FASTCGI] Same TCP Socket De= scriptor for Two FastCGI Processes<br> </font> </div> <br>=0A<div id=3D"yiv= 1074725300"><div><div style=3D"color: rgb(0, 0, 0); background-color: rgb(2= 55, 255, 255); font-family: times new roman,new york,times,serif; font-size= : 12pt;"><div>=0A=0A</div><div style=3D"font-family: Courier New,courier,mo= naco,monospace,sans-serif;" class=3D"yiv1074725300MsoNormal"><span lang=3D"= EN">Hi,</span></div>=0A=0A<div style=3D"font-family: Courier New,courier,mo= naco,monospace,sans-serif;" class=3D"yiv1074725300MsoNormal"> </div>= =0A=0A<div style=3D"font-family: Courier New,courier,monaco,monospace,sans-= serif;" class=3D"yiv1074725300MsoNormal"> I am using mod_fastcg= i with=0Aapache webserver, I have made a module in c which cater fastcgi re= quest and=0Aalso act as TCP Server which communicate with some other module= -x acting as=0Aclient. It works fine when only one such module runs. </div>= =0A=0A<div style=3D"font-family: Courier New,courier,monaco,monospace,sans-= serif;" class=3D"yiv1074725300MsoNormal"> </div>=0A=0A<div style=3D"fo= nt-family: Courier New,courier,monaco,monospace,sans-serif;" class=3D"yiv10= 74725300MsoNormal">But when i configure to run another similar=0Amodule mea= ns fastcgi process, Both the process gets same file descriptors when = =0Asocket(PF_INET,SOCK_STREAM,0) is called and when new connection is accep= ted=0Afrom module-x, which results in unexpected behaviour while sending me= ssages to=0Amodule-x.</div>=0A=0A<div style=3D"font-family: Courier New,cou= rier,monaco,monospace,sans-serif;" class=3D"yiv1074725300MsoNormal"> <= /div>=0A=0A<div style=3D"font-family: Courier New,courier,monaco,monospace,= sans-serif;" class=3D"yiv1074725300MsoNormal">HTTP Configuration</div>=0A= =0A<div style=3D"font-family: Courier New,courier,monaco,monospace,sans-ser= if;" class=3D"yiv1074725300MsoNormal"> </div>=0A=0A<div style=3D"font-= family: Courier New,courier,monaco,monospace,sans-serif;" class=3D"yiv10747= 25300MsoNormal">FastCgiServer /scripts/first.fcgi=0A-processes 1 </div>=0A= =0A<div style=3D"font-family: Courier New,courier,monaco,monospace,sans-ser= if;" class=3D"yiv1074725300MsoNormal">FastCgiServer /scripts/second.fcgi=0A= -processes 1</div>=0A=0A<div style=3D"font-family: Courier New,courier,mona= co,monospace,sans-serif;" class=3D"yiv1074725300MsoNormal"> </div>=0A= =0A<div style=3D"font-family: Courier New,courier,monaco,monospace,sans-ser= if;" class=3D"yiv1074725300MsoNormal">Any one can help please .......</div>= =0A=0A<div style=3D"font-family: Courier New,courier,monaco,monospace,sans-= serif;" class=3D"yiv1074725300MsoNormal"> </div>=0A=0A<div style=3D"fo= nt-family: Courier New,courier,monaco,monospace,sans-serif;" class=3D"yiv10= 74725300MsoNormal">Thanks,</div>=0A=0A<div style=3D"font-family: Courier Ne= w,courier,monaco,monospace,sans-serif;" class=3D"yiv1074725300MsoNormal">Ra= j</div>=0A=0A</div></div></div><br>________________________________________= _______<br>FastCGI-developers mailing list<br><a ymailto=3D"mailto:FastCGI-= [email protected]" href=3D"mailto:[email protected]= astcgi.com">FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org</a><br><a href=3D"http:/= /mailman.fastcgi.com/mailman/listinfo/fastcgi-developers" target=3D"_blank"= >http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers</a><br><br>= <br> </div> </div> </blockquote></div> </div></body></html> --640426125-1147443023-1345429117=:9917-- --===============4685247794588044368== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ FastCGI-developers mailing list FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers --===============4685247794588044368==--