Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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

by knox (Sexton)
on Jan 29, 2020 at 17:27 UTC ( #11112029=note: print w/replies, xml ) Need Help??

in reply to Re^5: 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. I've read good things about Dancer as well. From your experience, Would you say that Mojolicious is the best framework for FCGI?

As an aside, I am not necessary a new programmer, just rusty. I developed PHP years ago, then moved into other areas of tech. Outside of a little bit of python, lua, and javascript, I've done very little programming for nearly 8 years. I recently had project that Perl was the perfect fit, and I became hooked. I never realised the vastness of cpan and 'usefulliness' of Perl, so its made diving back into programming fun again. This particular board has been useful for when I am stuck, and when I am very stuck, the responses have been very quick!

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

Replies are listed 'Best First'.
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

    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 + at work but not by choice. I also strongly recommend nginx over apache at this point in the game.

      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 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.

        uWSGI is a server talking WSGI is a module speaking CGI

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (1)
As of 2023-06-07 19:47 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.