Skip Menu |

This queue is for tickets about the FCGI-ProcManager-MaxRequests CPAN distribution.

Report information
The Basics
Id: 47741
Status: open
Priority: 0/
Queue: FCGI-ProcManager-MaxRequests

People
Owner: Nobody in particular
Requestors: peter [...] vereshagin.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: FCGI::Spawn description fix
Date: Thu, 9 Jul 2009 17:41:48 +0500
To: bug-fcgi-procmanager-maxrequests [...] rt.cpan.org, Vladimir Timofeev <vovkasm [...] gmail.com>
From: Peter Vereshagin <peter [...] vereshagin.org>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nobody knows that you're out for that, bug-fcgi-procmanager-maxrequests! Thank you for mentioning FCGI::Spawn on FCGI::PM::MaxRequests' POD. I'd like to ask about the drawbacks of FCGI::Spawn documented there to make them clear and FCGI::Spawn better ( both as matter and the outside vision ). First, TCP sockets. FCGI::Spawn does them, the POD is fixed as of 0.14 Second, CGI::Fast. Is it any bad for anyone? Even FCGI::PM::MaxRequests does use it as synopsis too, doesn't it? So just is it a problem at all? Thank you. 73! Peter - -- http://vereshagin.org -----BEGIN PGP SIGNATURE----- Version: Vereshagin v2.0.10 (CP/M) iEYEARECAAYFAkpV5YsACgkQDOFKrKDiZicgOgCgqgHUktjdaSb/Jd3JkvzV+tTQ meEAn1X8puWBYKnTC9PgfrBy1IffPxci =24Be -----END PGP SIGNATURE-----
Subject: Re: [rt.cpan.org #47741] FCGI::Spawn description fix
Date: Fri, 10 Jul 2009 12:45:21 +0500
To: Vladimir Timofeev <vovkasm [...] gmail.com>, Bugs in FCGI-ProcManager-MaxRequests via RT <bug-FCGI-ProcManager-MaxRequests [...] rt.cpan.org>
From: Peter Vereshagin <peter [...] vereshagin.org>
Any time of year you can find me here Vladimir. 2009/07/10 03:36:01 +0400 Vladimir Timofeev <vovkasm@gmail.com> => To Peter Vereshagin : Show quoted text
VT> > First, TCP sockets. FCGI::Spawn does them, the POD is fixed as of 0.14
VT> Thanks, but I still can not understand how run an external FCGI VT> daemon, which will be listening to, say, localhost:8080
Such a thing is located inside FCGI ~/.cpan/build/FCGI-0.67/remote.fpl === ## Sample Apache configuration on the webserver to refer to the ## remote script on "otherhost" # <IFModule mod_fastcgi.c> # AddHandler fastcgi-script fcgi # FastCgiExternalServer /path-to/cgi-bin/external.fcgi -host otherhost:8888 # </IfModule> # Access the URL: http://webserver/cgi-bin/external.fcgi # Contributed by Don Bindner <dbindner@truman.edu> use FCGI; my $socket = FCGI::OpenSocket( ":8888", 5 ); my $request = FCGI::Request( \*STDIN, \*STDOUT, \*STDERR, \%ENV, $socket ); === perldoc FCGI === FCGI::OpenSocket(path, backlog) Creates a socket suitable to use as an argument to Request. path Pathname of socket or colon followed by local tcp port. === perldoc CGI::Fast === FCGI_SOCKET_PATH The address (TCP/IP) or path (UNIX Domain) of the socket the exter nal FastCGI script to which bind an listen for incoming connections from the web server. === So as I mentioned you should set $ENV{FCGI_SOCKET_PATH} before the CGI::Fast's BEGIN{} block is evaluated. FCGI::PM does evaluate it too, by far. Show quoted text
VT> In that case architecture is: VT> nginx - effectively serve static content, for dinamic content it VT> dispatch requests to Catalyst application with FCGI protocol on VT> another computer in network. VT> fcgi-daemons - listens on some ports, serve requests... it's big VT> Catalyst applications. VT> Can you explain this? And I upgrade my docs as soon as possible :-)
Catalyst's FastCGI and SCGI engines contain their own accept() loops so they are inappropriate for FCGI::Spawn, right. Catalyst's CGI engine doesn't take CGI or CGI::Simple object from outside so it's not appropriate for FCGI::Spawn, right. But I care about different thing. I never claimed FCGI::Spawn can serve for Catalyst. It's different subject. Agree about TCP? Show quoted text
VT>
VT> > Second, CGI::Fast. Is it any bad for anyone? Even FCGI::PM::MaxRequests does use it as synopsis too, doesn't it? So just is it a problem at all?
VT> I adapted SYNOPSIS from FCGI::ProcManager POD (real life example in VT> USING WITH CATALYST section). And difference is in who requires the VT> use of CGI:: Fast, user or the module author. VT> As for CGI::Fast, it's not bad (and it with CGI itself in perl core). VT> But alternatives exists because CGI::Fast extends CGI which is big VT> overhead for frameworks, because of that Catalyst, for ex, using VT> CGI::Simple
CGI::Fast is overhead for big applications, right. CGI.pm, as the base used for it, is bad thing for these cases, right. Question is: isn't the Synopsis a mandatory part of the documentation? So, if CGI::Fast is a good thing, it should be present in Synopsis as a recommendation. If CGI::Fast is a bad thing, it shouldn't. How can I use the FCGI::PM::MaxRequests if there is no recommended way to do this? CGI::Fast is a drawback and shouldn't be used as it follows from Synopsis. I don't negate it may be a bad idea to use CGI::Fast inside the FCGI::PM subclass and it is in the TODO list of FCGI::Spawn's POD as I'm about to make it suitable for SCGI. CGI.pm usage can be avoided with some CGI::Fast kind of extension, for example, if it's the only misadvantage of the CGI::Fast. I can use that same CGI::Simple as a base for CGI::Fast modification, if needed, no problem. Problem about CGI::Fast on your side is: controversy of FCGI::PM::MaxRequests POD: the Synopsis uses CGI::Fast as a good practice, but FCGI::Spawn section describes CGI::Fast as a FCGI::Spawn's bad practice. If it's problem of documentation, it concerns FCGI::Spawn and it is a problem of mis-spelling about comparison of the FCGI::PM::MaxRequests with the other code, so it is the problem of the FCGI::PM::MaxRequest's code or it shouldn't concern FCGI::Spawn as a documentation. If it's a problem of code that can not have clear synopsis, well, it is a problem of code and this should be documented as the absence of the clear way to use. You simply recommend to use FCGI::PM::MaxRequests in a way it shouldn't be used, right? Show quoted text
VT>
VT> > VT> > Thank you. VT> > VT> > 73! Peter VT> > - -- VT> > http://vereshagin.org VT> > -----BEGIN PGP SIGNATURE----- VT> > Version: Vereshagin v2.0.10 (CP/M) VT> > VT> > iEYEARECAAYFAkpV5YsACgkQDOFKrKDiZicgOgCgqgHUktjdaSb/Jd3JkvzV+tTQ VT> > meEAn1X8puWBYKnTC9PgfrBy1IffPxci VT> > =24Be VT> > -----END PGP SIGNATURE----- VT> >
VT> VT> -- VT> -- vovkasm
73! Peter -- http://vereshagin.org
CC: Bugs in FCGI-ProcManager-MaxRequests via RT <bug-FCGI-ProcManager-MaxRequests [...] rt.cpan.org>
Subject: Re: [rt.cpan.org #47741] FCGI::Spawn description fix
Date: Mon, 13 Jul 2009 02:10:23 +0400
To: Peter Vereshagin <peter [...] vereshagin.org>
From: Vladimir Timofeev <vovkasm [...] gmail.com>
2009/7/10 Peter Vereshagin <peter@vereshagin.org>: Show quoted text
> Any time of year you can find me here Vladimir. > 2009/07/10 03:36:01 +0400 Vladimir Timofeev <vovkasm@gmail.com> => To Peter Vereshagin : >
> VT> > First, TCP sockets. FCGI::Spawn does them, the POD is fixed as of 0.14
> VT> Thanks, but I still can not understand how run an external FCGI > VT> daemon, which will be listening to, say, localhost:8080
> > Such a thing is located inside FCGI > ~/.cpan/build/FCGI-0.67/remote.fpl > === > ## Sample Apache configuration on the webserver to refer to the > ## remote script on "otherhost" > # <IFModule mod_fastcgi.c> > #  AddHandler fastcgi-script fcgi > #  FastCgiExternalServer /path-to/cgi-bin/external.fcgi -host otherhost:8888 > # </IfModule> > > # Access the URL:  http://webserver/cgi-bin/external.fcgi > > # Contributed by Don Bindner <dbindner@truman.edu> > > use FCGI; > > my $socket = FCGI::OpenSocket( ":8888", 5 ); > my $request = FCGI::Request( \*STDIN, \*STDOUT, \*STDERR, >    \%ENV, $socket ); > === > perldoc FCGI > === > FCGI::OpenSocket(path, backlog) >           Creates a socket suitable to use as an argument to Request. >           path    Pathname of socket or colon followed by local tcp port. > === > perldoc CGI::Fast > === >      FCGI_SOCKET_PATH >           The address (TCP/IP) or path (UNIX Domain) of the socket the exter >           nal FastCGI script to which bind an listen for incoming connections >           from the web server. > === > > So as I mentioned you should set $ENV{FCGI_SOCKET_PATH} before the CGI::Fast's BEGIN{} block is evaluated. FCGI::PM does evaluate it too, by far. >
> VT> In that case architecture is: > VT> nginx - effectively serve static content, for dinamic content it > VT> dispatch requests to Catalyst application with FCGI protocol on > VT> another computer in network. > VT> fcgi-daemons - listens on some ports, serve requests... it's big > VT> Catalyst applications. > VT> Can you explain this? And I upgrade my docs as soon as possible :-)
> > Catalyst's FastCGI and SCGI engines contain their own accept() loops so they are inappropriate for FCGI::Spawn, right. > Catalyst's CGI engine doesn't take CGI or CGI::Simple object from outside so it's not appropriate for FCGI::Spawn, right. > But I care about different thing. I never claimed FCGI::Spawn can serve for Catalyst. It's different subject. > > Agree about TCP?
Oh, yes, agree after all :-) Show quoted text
>
> VT>
> VT> > Second, CGI::Fast. Is it any bad for anyone? Even FCGI::PM::MaxRequests does use it as synopsis too, doesn't it? So just is it a problem at all?
> VT> I adapted SYNOPSIS from FCGI::ProcManager POD (real life example in > VT> USING WITH CATALYST section). And difference is in who requires the > VT> use of CGI:: Fast, user or the module author. > VT> As for CGI::Fast, it's not bad (and it with CGI itself in perl core). > VT> But alternatives exists because CGI::Fast extends CGI which is big > VT> overhead for frameworks, because of that Catalyst, for ex, using > VT> CGI::Simple
> > CGI::Fast is overhead for big applications, right. CGI.pm, as the base used for it, is bad thing for these cases, right. > Question is: isn't the Synopsis a mandatory part of the documentation? So, if CGI::Fast is a good thing, it should be present in Synopsis as a recommendation. If CGI::Fast is a bad thing, it shouldn't. How can I use the FCGI::PM::MaxRequests if there is no recommended way to do this? CGI::Fast is a drawback and shouldn't be used as it follows from Synopsis. > I don't negate it may be a bad idea to use CGI::Fast inside the FCGI::PM subclass and it is in the TODO list of FCGI::Spawn's POD as I'm about to make it suitable for SCGI. CGI.pm usage can be avoided with some CGI::Fast kind of extension, for example, if it's the only misadvantage of the CGI::Fast. I can use that same CGI::Simple as a base for CGI::Fast modification, if needed, no problem. > Problem about CGI::Fast on your side is: controversy of FCGI::PM::MaxRequests POD: the Synopsis uses CGI::Fast as a good practice, but FCGI::Spawn section describes CGI::Fast as a FCGI::Spawn's bad practice. > If it's problem of documentation, it concerns FCGI::Spawn and it is a problem of mis-spelling about comparison of the FCGI::PM::MaxRequests with the other code, so it is the problem of the FCGI::PM::MaxRequest's code or it shouldn't concern FCGI::Spawn as a documentation. > If it's a problem of code that can not have clear synopsis, well, it is a problem of code and this should be documented as the absence of the clear way to use. > You simply recommend to use FCGI::PM::MaxRequests in a way it shouldn't be used, right?
After some thinking, I corrected docs. Please review it on http://svn.vovkasm.org/FCGI-ProcManager-MaxRequests/trunk/README, and then I release it. Thank you for explain all that :-) Show quoted text
>
> VT>
> VT> > > VT> > Thank you. > VT> > > VT> > 73! Peter > VT> > - -- > VT> > http://vereshagin.org > VT> > -----BEGIN PGP SIGNATURE----- > VT> > Version: Vereshagin v2.0.10 (CP/M) > VT> > > VT> > iEYEARECAAYFAkpV5YsACgkQDOFKrKDiZicgOgCgqgHUktjdaSb/Jd3JkvzV+tTQ > VT> > meEAn1X8puWBYKnTC9PgfrBy1IffPxci > VT> > =24Be > VT> > -----END PGP SIGNATURE----- > VT> >
> VT> > VT> -- > VT> -- vovkasm
> 73! Peter > -- > http://vereshagin.org >
-- -- vovkasm
CC: Peter Vereshagin <peter [...] vereshagin.org>, Bugs in FCGI-ProcManager-MaxRequests via RT <bug-FCGI-ProcManager-MaxRequests [...] rt.cpan.org>
Subject: Re: [rt.cpan.org #47741] FCGI::Spawn description fix
Date: Tue, 14 Jul 2009 10:05:24 +0500
To: Vladimir Timofeev <vovkasm [...] gmail.com>
From: Peter Vereshagin <peter [...] vereshagin.org>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Wake me up when September ends, Vladimir! 2009/07/13 02:10:23 +0400 Vladimir Timofeev <vovkasm@gmail.com> => To Peter Vereshagin : Show quoted text
> 2009/7/10 Peter Vereshagin <peter@vereshagin.org>:
>> 2009/07/10 03:36:01 +0400 Vladimir Timofeev <vovkasm@gmail.com> => To Peter Vereshagin : >>
>> VT> > First, TCP sockets. FCGI::Spawn does them, the POD is fixed as of 0.14
>> VT> Thanks, but I still can not understand how run an external FCGI >> VT> daemon, which will be listening to, say, localhost:8080
>> >> Such a thing is located inside FCGI >> ~/.cpan/build/FCGI-0.67/remote.fpl >> === >> ## Sample Apache configuration on the webserver to refer to the >> ## remote script on "otherhost" >> # <IFModule mod_fastcgi.c> >> #  AddHandler fastcgi-script fcgi >> #  FastCgiExternalServer /path-to/cgi-bin/external.fcgi -host otherhost:8888 >> # </IfModule> >> >> # Access the URL:  http://webserver/cgi-bin/external.fcgi >> >> # Contributed by Don Bindner <dbindner@truman.edu> >> >> use FCGI; >> >> my $socket = FCGI::OpenSocket( ":8888", 5 ); >> my $request = FCGI::Request( \*STDIN, \*STDOUT, \*STDERR, >>    \%ENV, $socket ); >> === >> perldoc FCGI >> === >> FCGI::OpenSocket(path, backlog) >>           Creates a socket suitable to use as an argument to Request. >>           path    Pathname of socket or colon followed by local tcp port. >> === >> perldoc CGI::Fast >> === >>      FCGI_SOCKET_PATH >>           The address (TCP/IP) or path (UNIX Domain) of the socket the exter >>           nal FastCGI script to which bind an listen for incoming connections >>           from the web server. >> === >> >> So as I mentioned you should set $ENV{FCGI_SOCKET_PATH} before the CGI::Fast's BEGIN{} block is evaluated. FCGI::PM does evaluate it too, by far. >>
>> VT> In that case architecture is: >> VT> nginx - effectively serve static content, for dinamic content it >> VT> dispatch requests to Catalyst application with FCGI protocol on >> VT> another computer in network. >> VT> fcgi-daemons - listens on some ports, serve requests... it's big >> VT> Catalyst applications. >> VT> Can you explain this? And I upgrade my docs as soon as possible :-)
>> >> Catalyst's FastCGI and SCGI engines contain their own accept() loops so they are inappropriate for FCGI::Spawn, right. >> Catalyst's CGI engine doesn't take CGI or CGI::Simple object from outside so it's not appropriate for FCGI::Spawn, right. >> But I care about different thing. I never claimed FCGI::Spawn can serve for Catalyst. It's different subject. >> >> Agree about TCP?
> >Oh, yes, agree after all :-) >
>>
>> VT>
>> VT> > Second, CGI::Fast. Is it any bad for anyone? Even FCGI::PM::MaxRequests does use it as synopsis too, doesn't it? So just is it a problem at all?
>> VT> I adapted SYNOPSIS from FCGI::ProcManager POD (real life example in >> VT> USING WITH CATALYST section). And difference is in who requires the >> VT> use of CGI:: Fast, user or the module author. >> VT> As for CGI::Fast, it's not bad (and it with CGI itself in perl core). >> VT> But alternatives exists because CGI::Fast extends CGI which is big >> VT> overhead for frameworks, because of that Catalyst, for ex, using >> VT> CGI::Simple
>> >> CGI::Fast is overhead for big applications, right. CGI.pm, as the base used for it, is bad thing for these cases, right. >> Question is: isn't the Synopsis a mandatory part of the documentation? So, if CGI::Fast is a good thing, it should be present in Synopsis as a recommendation. If CGI::Fast is a bad thing, it shouldn't. How can I use the FCGI::PM::MaxRequests if there is no recommended way to do this? CGI::Fast is a drawback and shouldn't be used as it follows from Synopsis. >> I don't negate it may be a bad idea to use CGI::Fast inside the FCGI::PM subclass and it is in the TODO list of FCGI::Spawn's POD as I'm about to make it suitable for SCGI. CGI.pm usage can be avoided with some CGI::Fast kind of extension, for example, if it's the only misadvantage of the CGI::Fast. I can use that same CGI::Simple as a base for CGI::Fast modification, if needed, no problem. >> Problem about CGI::Fast on your side is: controversy of FCGI::PM::MaxRequests POD: the Synopsis uses CGI::Fast as a good practice, but FCGI::Spawn section describes CGI::Fast as a FCGI::Spawn's bad practice. >> If it's problem of documentation, it concerns FCGI::Spawn and it is a problem of mis-spelling about comparison of the FCGI::PM::MaxRequests with the other code, so it is the problem of the FCGI::PM::MaxRequest's code or it shouldn't concern FCGI::Spawn as a documentation. >> If it's a problem of code that can not have clear synopsis, well, it is a problem of code and this should be documented as the absence of the clear way to use. >> You simply recommend to use FCGI::PM::MaxRequests in a way it shouldn't be used, right?
> >After some thinking, I corrected docs. Please review it on >http://svn.vovkasm.org/FCGI-ProcManager-MaxRequests/trunk/README, and
MD5 is c151c04bc88c30d29e3e4b9c604eeff9 "FCGI:Spawn -- best for small" There is no reason why fastcgi scripts for FCGI::Spawn should be small. Even in sight of CGI::Fast, the problem is a performance overhead, not the size itself, right? for http://alpha.vereshagin.org the WebGUI namespace sources size is 3.5M , is it that small? My opportunity is : "works as a server, put max_requests idea". Cause the difference from the process manager as it defined by FCGI::PM is a connection accept() loop and that's why ::Spawn is not inside FCGI::PM namespace. Additions like " for CGI-fashion fastcgi scripts" and "for deprecated but useable old-school fastcgi programs" are ok. Show quoted text
>then I release it. >Thank you for explain all that :-)
I'm about to derive then, so few more questions should follow unrelated to this ticket :-) Show quoted text
>
73! Peter - -- http://vereshagin.org -----BEGIN PGP SIGNATURE----- Version: Vereshagin v2.0.10 (CP/M) iEYEARECAAYFAkpcEhMACgkQDOFKrKDiZiesZQCfWDIROxJauN4E9il7/m8G1npt 1dkAn0gbY2Em4NbckUgav+R3rygNuIYZ =urha -----END PGP SIGNATURE-----