Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by Your Mother (Archbishop)
on Jan 29, 2020 at 18:07 UTC ( [id://11112034]=note: print w/replies, xml ) Need Help??


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

Lots of devs like Dancer2. I am not one of them. :P My expertise is Catalyst but it’s a terrible thing to recommend to someone just starting out and I’m using it less frequently all the time. Mojolicious::Lite is super easy to jump into. As far as FastCGI, I would recommend against it, pretty strongly. It has no benefit over other application persistence layers, far, far fewer features, and depending on deployment, it has some drawbacks; like requiring a webserver restart to pick up new code, or making forking impossible/tricky. I only use uWSGI when I have the ability to choose for myself. I am using Catalyst over FCGI and a custom app server + CGI.pm at work but not by choice. I also strongly recommend nginx over apache at this point in the game.

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

Replies are listed 'Best First'.
Re^8: Perl FCGI Error: mod_fcgid: error reading data from FastCGI server
by knox (Sexton) on Jan 30, 2020 at 03:50 UTC

    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

      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.

      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://11112034]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-23 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found