Welcome! Log In Create A New Profile

Advanced

Re: Best practices for running Perl?

April 30, 2009 04:15PM
Mark Aiken Wrote:
-------------------------------------------------------
> Let me ask a more focused question, since we don't
> really need to use
> the nginx list to debate web languages.
>
> 1 - Is the nginx built-in Perl module ready for
> production use? Has
> anyone here used it in a production environment?

From http://wiki.nginx.org/NginxEmbeddedPerlModule:

Known Problems

This module is experimental; therefore anything is possible and bugs are likely.

1. It's possible for Nginx to leak memory if you reload the configuration file (via 'kill -HUP <pid>').
2. If a Perl module performs protracted operation, (for example DNS lookups, database queries, etc), then the process that is running the Perl script is completely tied up for the duration of script. Therefore embedded Perl scripts should be extremely careful to limit themselves to short, predictable operations.
3. Nginx may laugh at your Perl code and hit on your girlfriend.


> 2 - If not, what is the current best practice for
> running Perl behind
> nginx in production?

I would use fcgiwrap which seems to work well in most situations. See http://nginx.localdomain.pl/wiki/FcgiWrap.

> 3 - What is the current best practice for running
> PHP behind nginx in
> production? Is this better than the answer for
> Perl?

That's a question of religion. Some people insist on proxy to Apache with mod_php. Others prefer fastcgi using fastcgi_pass directive.

How you start php-cgi is also a matter of religion. Some use spawn-fcgi, some use php-fpm, some use the nifty init script at http://wiki.nginx.org/RedHatPHPFCGIInitScript.

I use fastcgi and php-fpm. See http://php-fpm.anight.org/download.html. There is a patch for php 5.2.9 at http://www.2shared.com/file/5008466/4549200/php-fpm.html.

Better than Perl? Depends what you are doing with it I suppose. From the little that you describe I would likely prefer php.
>
> Thanks!
>
> Mark
>
> On Thu, Apr 30, 2009 at 12:08 PM, Gabriel Ramuglia
> wrote:
> > I would consider php more lightweight than perl
> in general, even
> > though perl is a good option for various logfile
> and other
> > text-processing related tasks
> >
> > On Thu, Apr 30, 2009 at 11:54 AM, Chris Cortese
> > wrote:
> >> in reading more closely, scratch Ruby... but I
> still would consider PHP
> >> before Perl...
> >>
> >> Chris Cortese wrote:
> >>>
> >>> IMHO starting with Perl...

--
Jim Ohlstein
Subject Author Posted

Best practices for running Perl?

Mark Aiken April 30, 2009 02:46PM

Re: Best practices for running Perl?

Chris Cortese April 30, 2009 02:51PM

Re: Best practices for running Perl?

Chris Cortese April 30, 2009 02:54PM

Re: Best practices for running Perl?

Mark Aiken April 30, 2009 03:06PM

Re: Best practices for running Perl?

Gabriel Ramuglia April 30, 2009 03:08PM

Re: Best practices for running Perl?

Mark Aiken April 30, 2009 03:38PM

Re: Best practices for running Perl?

Jim Ohlstein April 30, 2009 04:15PM

Re: Best practices for running Perl?

Gabriel Ramuglia April 30, 2009 04:22PM

Re: Best practices for running Perl?

Jonathan Vanasco April 30, 2009 04:49PM

Re: Best practices for running Perl?

Chris Cortese April 30, 2009 05:01PM

Re: Best practices for running Perl?

luben karavelov May 01, 2009 08:25PM

Re: Best practices for running Perl?

Maxim Dounin April 30, 2009 04:09PM

Re: Best practices for running Perl?

Mark Aiken April 30, 2009 04:21PM

Re: Best practices for running Perl?

mike April 30, 2009 04:05PM

Re: Best practices for running Perl?

luben karavelov May 01, 2009 08:43PM

Re: Best practices for running Perl?

mike May 01, 2009 09:17PM

Re: Best practices for running Perl?

luben karavelov May 01, 2009 10:10PM

Re: Best practices for running Perl?

mike May 01, 2009 11:52PM

Re: Best practices for running Perl?

luben karavelov May 02, 2009 10:48AM

Re: Best practices for running Perl?

luben karavelov May 02, 2009 10:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 293
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready