Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^8: Perl FCGI Error: mod_fcgid: error reading data from FastCGI server

by knox (Sexton)
on Jan 30, 2020 at 03:50 UTC ( #11112068=note: print w/replies, xml ) Need Help??


in reply to Re^7: Perl FCGI Error: mod_fcgid: error reading data from FastCGI server
in thread Perl FCGI Error: mod_fcgid: error reading data from FastCGI server

thank you.

From your comments, if learning time was not issue, would you recommend uWSGI over Catalyst and Mojolicious::Lite? Current project is more of a 'hobby project' so no one is breathing down my neck. I am trying to get a grasp of best way of doing Perl on the web for 2020. I have not read about uWSGI yet, so I will do some research on this.

My understanding (please correct if I am wrong) after reading most the ways the ways to write webapps in Perl (eg mod_perl, cgi, fcgi, FastCGI), is that PSGI allows for any of those methods to be deployed, and code remains portable as long as it uses PSGI? Is this much different from uWSGI?

it has some drawbacks; like requiring a webserver restart to pick up new code - yes, I found this out the hard way yesterday...grrr

  • Comment on Re^8: Perl FCGI Error: mod_fcgid: error reading data from FastCGI server

Replies are listed 'Best First'.
Re^9: Perl FCGI Error: mod_fcgid: error reading data from FastCGI server
by Your Mother (Archbishop) on Jan 30, 2020 at 09:24 UTC

    What anonymonk said. The whole (([PW]S)|C)GI is just the specification for how code talks with the server. In the same kind of way HTTP is a specification for how browsers talk to servers. The server used to only be things like apache back in the day. So it could directly execute scripts on demand, giving the script the environment variables the spec requires, and get back an HTTP response or the parts to complete. No other application layer necessary. No code held in memory to be re-executed persistently.

    PSGI is just a newer standard that affords persistent and modern code connections (like streaming) better. WSGI is the Python version of PSGI. Plack is a suite of packages that implement the PSGI standard for Perl; the same way the CGI.pm package and friends implement the CGI standard for Perl.

    I donít think Iíd recommend Catalyst to anyone at this point. Itís large and powerful and stableÖ but itís also coasting on fumes and things like websockets are difficult while they are trivial in Mojolicious. uWSGI is an application engine, the persistence layer. So itís what is running your code and managing the number of worker processes and hot restarts and such. Itís usually put behind a normal webserver like nginx or apache.

    It is difficult to talk about this stuff tersely. I know it seems complicated at first. I remember spending like an entire weekend back in 1998 searching, probably altavista and yahoo at that point, trying to just understand what the fsck a ďwebserverĒ was. But this stuff is all mostly pretty easy, it just has a lot of moving parts. Something I wish I had started with instead of learning by osmosis and context is vanilla HTTP. That informs a huge amount of everything that follows.

    Update: pulled some redundant words.

      I understand the lack of terseness, there's is a lot to wade through here. This reply helps me see how all those moving parts work together. This is a really good, thanks.
Re^9: Perl FCGI Error: mod_fcgid: error reading data from FastCGI server
by Anonymous Monk on Jan 30, 2020 at 05:04 UTC

    uWSGI is a server talking WSGI

    CGI.pm is a module speaking CGI

    Mojo is a perl module....talking PSGI ... Can talks with uWSGI

      thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11112068]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2023-06-07 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (29 votes). Check out past polls.

    Notices?