Re: Funding [WAS :Re: trying to compile mod_perl against httpd-2.4.1]

2012-03-07 Thread Torsten Förtsch
On Tuesday, 28 February 2012 18:14:20 Vincent Veyron wrote:
 I am a tiny one-man company using mod_perl with great success(*) and
 pleasure, and your post has me very worried that it could end in a
 hurry

So am I and so are many (perhaps most) of the other contributors. What I am 
trying to say is, if modperl is the basis of your business why don't you start 
contribute? You'll be in good and friendly company.

This is how I got to modperl. In the late 1990ies I did a project involving 
mp1. That was almost my first encounter with Perl. A few years later that 
client wanted to switch to httpd 2.0. So, they hired me again. At that time I 
had a few years of experience in Perl. I also had skimmed through 
perlxs/guts/api but was far from understanding it. I had tried a few examples 
but that was all.

One of the first things I did for modperl was a fix for APR::Base64.I had 
noticed that one of encode() or decode() left a superfluous \0 byte at the end 
of the resulting string. Of course I could switch to MIME::Base64 and forget 
about APR::Base64. But that would mean to dupliate the code to work with 
base64 encoding - something I don't like at all. So, I tried to fix the bug 
and surprisingly succeeded. It wasn't by far as complicated as I had expected. 
In the end the patch I sent to the mailing list didn't get applied as I had 
sent it, I think (but maybe this was another patch). Someone more experienced 
had found a better solution.

At that time I had reported to my client that mp2 works. I also had read the 
docs and was intrigued by PerlInterpScope handler. I had asked on the users 
list if it was a good idea to use it and was encouraged by Stas to go ahead. 
Well, it was disastrous and I ended up hacking modperl_interp.c. I think I 
have found and fixed a few bugs. And - much more important - I have learned a 
big deal about httpd, modperl and perl. Also, before that time I seldom 
reported bugs or wrote to mailing lists. I was too shy - my command of English 
was embarrassing.

Also, it occurred to me that the creators of all of these shining open source 
programs are not god-like creatures but people like you and me. And if I want 
these projects to succeed I have to contribute my share.

I didn't want to worry you. Quite the contrary, I wanted to encourage people 
to join. Give it time and modperl will support httpd 2.4. But it requires work 
to be done. You can help.

Sorry for the late reply, I was on vacation.

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net


Re: Funding [WAS :Re: trying to compile mod_perl against httpd-2.4.1]

2012-02-29 Thread Vincent Veyron
Le mardi 28 février 2012 à 17:27 -0500, Perrin Harkins a écrit :
 On Tue, Feb 28, 2012 at 4:48 PM, Jan Dubois j...@activestate.com wrote:
  I find this talk an excellent overview of all the different ways to
  deploy Perl (PSGI) applications:
 
  http://www.slideshare.net/miyagawa/deploying-plack-web-applications-oscon-2011-8706659
 
 There's also a talk I gave a couple of years ago about non-plack
 options, like nginx+fastcgi:
 http://elem.com/~perrin/web_arch.pdf.gz
 

Wow! Rich environment indeed...

It is very reassuring to know that mod_perl is doing fine and that we
also have all these fallback solutions.

Open source is really amazing.

-- 
Vincent Veyron
http://marica.fr/
Logiciel de gestion des sinistres et des contentieux pour le service juridique



Re: Funding [WAS :Re: trying to compile mod_perl against httpd-2.4.1]

2012-02-29 Thread Perrin Harkins
On Wed, Feb 29, 2012 at 2:33 PM, Dan Axtell daniel.axt...@snet.net wrote:
 Basically I want to have various virtual hosts be reverse proxied to various
 back end servers (e.g. mod_perl for some legacy apps, a Catalyst app under
 fast CGI).  I tried this with Nginx and it all seemed to work but what I
 discovered is that over time the backend Apache processes were using more and
 more memory, whereas when I go back to a monolithic Apache the memory usage
 stays pretty stable.

That's odd.  I would check how you have Keep-Alive configured and how
long you let the mod_perl processes live (MaxRequestsPerChild) in both
cases.  Nginx should be just fine as a proxy.

 In your slideshow you talk about using Apache with a threaded worker MPM as
 the frontend and a prefork MPM as the backend.  So I'm trying to set that up
 with Apache 2.2.22 but I'm having problems serving basic content (I'm getting
 text but not formatted HTML)

Sounds like a missing content-type header.

 Is there a recommended version of Apache for doing this?

It's mod_proxy configuration.  There are lots of guides on how to do
it, including some on the mod_perl site.  Search for mod_proxy or
reverse proxy.

- Perrin


Re: Funding [WAS :Re: trying to compile mod_perl against httpd-2.4.1]

2012-02-29 Thread Dave Hodgkinson

On 29 Feb 2012, at 19:33, Dan Axtell wrote:

 
 Basically I want to have various virtual hosts be reverse proxied to various 
 back end servers (e.g. mod_perl for some legacy apps, a Catalyst app under 
 fast CGI).  I tried this with Nginx and it all seemed to work but what I 
 discovered is that over time the backend Apache processes were using more and 
 more memory, whereas when I go back to a monolithic Apache the memory usage 
 stays pretty stable.

Your fat apache is an application server. Only have sufficient MaxClients to 
saturate
CPU if you hammer it. Recycle memory with a sensible MaxRequestsPerChild. Make
forking new children cheap by loading the world in startup.pl.

Read Stas's guide.




Re: Funding [WAS :Re: trying to compile mod_perl against httpd-2.4.1]

2012-02-28 Thread Perrin Harkins
2012/2/28 Vincent Veyron vv.li...@wanadoo.fr:
 I am a tiny one-man company using mod_perl with great success(*) and
 pleasure, and your post has me very worried that it could end in a
 hurry :-(

Don't panic!  There's no immediate danger to mod_perl, and most people
are not trying to run on the very latest versions of perl and apache.
Even if mod_perl someday stops being developed for new versions of
perl and apache, there will be no immediate need to move off it and
plenty of alternatives available.

 Can't the ASF dedicate some funds for that, to pay for your work?

No, that's not how the ASF works.  Coding is a volunteer effort.
Money is spent on infrastructure like hosting.

 Also, I wonder what the big players who subscribe to this list think of
 such a situation?

It's fine for people to make their own deals to sponsor developers.
Some companies who need something will pay their own developers to
build it.  Most likely, no one has needed this enough to develop it
yet.  (Because they're all running apache 1.3...)

- Perrin


Re: Funding [WAS :Re: trying to compile mod_perl against httpd-2.4.1]

2012-02-28 Thread Randolf Richardson
 2012/2/28 Vincent Veyron vv.li...@wanadoo.fr:
  I am a tiny one-man company using mod_perl with great success(*) and
  pleasure, and your post has me very worried that it could end in a
  hurry :-(

I depend on mod_perl2 for nearly all the web sites that I maintain, 
and I've been trying to encourage others to use the same technology 
(it's more challenging with the hundreds of voices pushing PHP 
compared to my one voice promoting ModPerl, but I don't consider this 
a valid justification for discouragement).

You probably also enjoy the efficient response times to HTTP clients 
and the direct server-side access to the API via APR, etc.  All this 
and the many other things that ModPerl provides is of tremendous 
worth in my strong opinion.

 Don't panic!  There's no immediate danger to mod_perl, and most people
 are not trying to run on the very latest versions of perl and apache.
 Even if mod_perl someday stops being developed for new versions of
 perl and apache, there will be no immediate need to move off it and
 plenty of alternatives available.

That's re-assuring.  Thanks.

  Can't the ASF dedicate some funds for that, to pay for your work?
 
 No, that's not how the ASF works.  Coding is a volunteer effort.
 Money is spent on infrastructure like hosting.
 
  Also, I wonder what the big players who subscribe to this list think of
  such a situation?
 
 It's fine for people to make their own deals to sponsor developers.
 Some companies who need something will pay their own developers to
 build it.  Most likely, no one has needed this enough to develop it
 yet.  (Because they're all running apache 1.3...)

The last time I used Apache HTTPd v1.anything on my servers was when 
I was hosting a few hundred web sites on Novell NetWare.  When I 
migrated to NetBSD there was Apache HTTPd v2.something and so I used 
the migration as an opportunity to perform the massive code upgrades 
to mod_perl2 (this was not a small effort, but it also wasn't overly 
complicated for the most part after getting used to the changes).

I hear rumours from time-to-time that SlashDot continues to use 
mod_perl1, but considering that mod_perl2 has been available for so 
long now I always doubted it under the assumption that most people 
would have upgraded by now.

Are a lot of people still using the version 1 series of httpd and/or 
mod_perl?

Randolf Richardson - rand...@inter-corporate.com
Inter-Corporate Computer  Network Services, Inc.
Beautiful British Columbia, Canada
http://www.inter-corporate.com/




Re: Funding [WAS :Re: trying to compile mod_perl against httpd-2.4.1]

2012-02-28 Thread Vincent Veyron
Le mardi 28 février 2012 à 13:46 -0500, Perrin Harkins a écrit :

 Even if mod_perl someday stops being developed for new versions of
 perl and apache, there will be no immediate need to move off it and
 plenty of alternatives available.
 

Do you think nginx+perl could be one of those alternatives?


-- 
Vincent Veyron
http://marica.fr/
Logiciel de gestion des sinistres et des contentieux pour le service juridique



Re: Funding [WAS :Re: trying to compile mod_perl against httpd-2.4.1]

2012-02-28 Thread Perrin Harkins
On Tue, Feb 28, 2012 at 4:48 PM, Jan Dubois j...@activestate.com wrote:
 I find this talk an excellent overview of all the different ways to
 deploy Perl (PSGI) applications:

 http://www.slideshare.net/miyagawa/deploying-plack-web-applications-oscon-2011-8706659

There's also a talk I gave a couple of years ago about non-plack
options, like nginx+fastcgi:
http://elem.com/~perrin/web_arch.pdf.gz

- Perrin