It is declining - but that is that very few people used even 1% of it's
functionality - they just used it to have a perl interpreter embedded in the
webserver. It is and never was a web framework - it was more fundamental than
that - it add functions to
Perl but you could do what you wanted
as it sort of just dies!
-Original Message-
From: pengyh
Sent: 09 August 2022 13:04
To: James Smith ; modperl@perl.apache.org
Subject: Re: is mpm_event safe for modperl handler? [EXT]
I think running Ignix as front-end server and mod_perl for backend server is
the more popular choice.
If you want the speed of mod_event for static content and the power of mod_perl
for dynamic content - the best way is to run a lightweight mod_event apache in
front of a mod_prefork to run the mod_perl
tbh this is exactly the set up most people use for other heavy backends
(mod_fastcgi
The other problem with sharing writable data in "memory" is that it would not
necessarily shared between multiple server instances. We run multiple mod_perl
instances for reliability. Agree with other posters either use something like
redis or memcache (possibly backed with a database).
The problem is I don't think there is mod_perl is quite a unique infrastructure
- across all language I believe! I don't think any other language/framework
gives you this level of flexibility.
Most frameworks just concentrate on the request phase and shoe horn everything
in there - so you
other machines - taking servers + desktop machines -
something like 30-50K cores.
-Original Message-
From: Clive Eisen
Sent: 09 February 2021 19:23
To: Rafael Caceres
Cc: James Smith ; Vincent Veyron ;
modperl@perl.apache.org
Subject: Re: Moving ExecCGI to mod_perl - performance and
1:34 +0000
James Smith mailto:j...@sanger.ac.uk>> wrote:
Hi James,
> DBI sharing doesn't really gain you much - and can actually lead you into a
> whole world of pain. It isn't actually worth turning it on at all.
>
Never had a problem with it myself in years of using it, but I wr
to mod_perl - performance and custom 'modules' [EXT]
On Sun, 7 Feb 2021 20:21:34 +
James Smith wrote:
Hi James,
> DBI sharing doesn't really gain you much - and can actually lead you into a
> whole world of pain. It isn't actually worth turning it on at all.
>
Never had
]
On Mon, Feb 8, 2021 at 09:13, James Smith
mailto:j...@sanger.ac.uk>> wrote:
Use perl-critic this will find most of the nasties that you have the classic is:
Thanks for the tip! I have no idea how long I've been writing stuff in perl -
and I never knew of this!
I ran it with the -3 option - w
Use perl-critic this will find most of the nasties that you have the classic is:
my $var = {code} if {condition};
The my gets round perl strict, but $var doesn’t get updated if {condition}
isn’t met, so holds the variable from the last time round..
Better is
my $var = ‘’;
$var = {code} if
, Feb 8, 2021, at 4:21 AM, James Smith wrote:
DBI sharing doesn't really gain you much - and can actually lead you into a
whole world of pain. It isn't actually worth turning it on at all.
We use dedicated DB caching in the cases where we benefit from it as and when
you need it (low level caching
perl: Requests per second:59.81 [#/sec] (mean)
> >>
> >> This is obviously a good thing.
> >>
> >> I haven't gotten into the preload or DBI sharing yet - as that'll
> >> end up needing a bit of a rewrite of code to take advantage of. I'd
> >> be open to suggestions her
pooling and long
duration database handles. We get round it with permanent MySQL connections by
closing/re-opening them after 5 minutes of inactivity – hence the need to
develop our own cache/pool….
From: Mithun Bhattacharya
Sent: 07 February 2021 20:36
To: James Smith
Cc: Vincent Veyron
To: Steven Haigh
Cc: James Smith ; modperl@perl.apache.org
Subject: Re: Moving ExecCGI to mod_perl - performance and custom 'modules' [EXT]
On Sun, 07 Feb 2021 23:58:17 +1100
Steven Haigh wrote:
>
> I haven't gotten into the preload or DBI sharing yet - as that'll end
> up need
: Adam Prime
Sent: 07 February 2021 13:45
To: Steven Haigh
Cc: James Smith ; modperl@perl.apache.org
Subject: Re: [EXT]
There is one other thing you can do relatively easily that may get you a
marginal gain when Apache spins up new children. Load some or all of your Perl
dependencies before
As welsey said – try Registry, that was the standard way of using mod_perl to
cache perl in the server – but your problem might be due to the note in
PerlRun…
https://perl.apache.org/docs/2.0/api/ModPerl/PerlRun.html#Description
META: document that for now we don't chdir() into the script's
choice for whatever you are doing and if yes
then why ? How much of your stuff is using mod_perl considering you mentioned
not much is web related ?
3. What are the challenges you are currently facing with your implementation ?
On Wed, Dec 23, 2020 at 6:58 AM James Smith
mailto:j...@sanger.ac.uk
is not serious problem, each of our server has 64GB memory.
Forgot to add - so our FCGI servers need a lot (and I mean a lot) more memory
than the mod_perl servers to serve the same level of content (just in case
memory blows up with FCGI backends)
-Original Message-
From: James Smith mailto:j
Forgot to add - so our FCGI servers need a lot (and I mean a lot) more memory
than the mod_perl servers to serve the same level of content (just in case
memory blows up with FCGI backends)
-Original Message-
From: James Smith
Sent: 23 December 2020 11:34
To: André Warnier (tomcat/perl
> This costs memory, and all the more since many perl modules are not
> thread-safe, so if you use them in your code, at this moment the only safe
> way to do it is to use the Apache httpd prefork model. This means that each
> Apache httpd child process has its own copy of the perl
queries per second.
>
500 tables is a lot more than what I typically handle. I'm sure it complicates
things.
But see this post by James Smith in a recent thread :
http://mail-archives.apache.org/mod_mbox/perl-modperl/202008.mbox/ajax/%3Cef383804cf394c53b48258531891d12b%40sa
in - or creating a "shopping cart" {in the
loosest terms}. It take a huge load off the file system / database.
-Original Message-
From: Vincent Veyron
Sent: 21 December 2020 13:51
To: modperl@perl.apache.org
Cc: James Smith
Subject: Don't use session hashes [EXT]
On Mon, 21 Dec 202
>
500 tables is a lot more than what I typically handle. I'm sure it complicates
things.
But see this post by James Smith in a recent thread :
https://urldefense.proofpoint.com/v2/url?u=http-3A__mail-2Darchives.apache.org_mod-5Fmbox_perl-2Dmodperl_202008.mbox_ajax_-253Cef383804cf394c
everage these advancements. Many of Perl's
dependencies are not thread safe and mod_perl forces you to use mpm_prefork. My
organization has started moving away from Perl to Elixir for these reasons.
On Tue, Aug 4, 2020, 3:37 AM James Smith
mailto:j...@sanger.ac.uk>> wrote:
Perl is a great sol
There are cases where Plack though isn't the solution and where mod_perl
written well is a far better (more stable) solution.
It is good when the backend servers are slow (simple not complex app); backend
requests are relatively fast, and don't use much memory.
But the warning
(1) If you have
You can still have an always up service – but it will require a bit of work and
a load balancing proxy set up in front of multiple apache instances. You can
then restart each backend independently without an issue.
If the apaches are relatively lightweight you can run two on the same machine
Wesley,
You will have seen my posts elsewhere - we work on large Terra/Peta byte scale
datasets {and these aren't a large number of large records but more a very,
very large number of small records} so the memory and response times are both
large - less so compute in some cases but not others.
Cc: Joseph He ; James Smith ; John
Dunlap ; Wesley Peng ; mod_perl list
Subject: Re: suggestions for perl as web development language [EXT]
On 4 Aug 2020, at 21:55, Mithun Bhattacharya
mailto:mit...@gmail.com>> wrote:
Ours is a REST based service so every request has busi
From: John Dunlap
Sent: 04 August 2020 15:30
To: Wesley Peng
Cc: mod_perl list
Subject: Re: suggestions for perl as web development language [EXT]
The fundamental and, in my opinion, fatal flaws of mod_per are as follows:
> 1) Concurrency. mod_perl is pretty close to forced to use
Perl is a great solution for web development.
Others will disagree but the best way I still believe is using mod_perl - but
only if you use it's full power - and you probably need a special sort of mind
set to use - but that can be said for any language.
From experience - it may be
I would prefer to see a mod_perl 2.6 or 3 against perl 5 rather than
perl 6 - I think it wouldn't go to far against perl 6 as there isn't the
uptake - we would be unlikely to migrate to a perl 6 backend - there is
too much pressure already to move to an alternative language (python at
the
Agree with this we use AAA handlers - but more importantly output
filters to allow content to be decorated per site (independent of what
generates the content perl/java/php proxied content etc...} and add in a
few useful extra logging features that rely on things like transHandlers
and log &
people who just use response handlers do not see this issue. But we hook
into about 10 phases of the apache process ...
On 08/06/2018 02:08, John Dunlap wrote:
Does using mod_perl properly allow you to use mpm_event or mpm_worker?
On Thu, Jun 7, 2018 at 9:19 PM, Dr James Smith <mailt
Unfortunately Plack (and Catalyst especially) are a fairly poor
comparison to using mod_perl properly {unfortunately very few people do
so} I've looked at Dancer and Catalyst - both are OK at what they do -
but they don't really handle things in the really clean easy way that
mod_perl does {if
On 2017-05-30 03:49 PM, Dirk-Willem van Gulik wrote:
On 30 May 2017, at 16:43, John Dunlap > wrote:
How is it a security hole?
….
> my $ret = eval { $m->...() };
Just imagine $m->…() returning something containing a valid perl
expression
RANSACTION
# DO SOME STUFF
# COMMIT DATA BASE TRANSACTION
return 'SOME VALUE';
};
if ($@) {
my $error = $@;
# ROLLBACK DATABASE TRANSACTION
# LOG ERROR
}
On Tue, May 30, 2017 at 4:47 AM, James Smith <j...@sanger.ac.uk> wrote:
Not really a mod_perl question bu
Not really a mod_perl question but you can always wrap your method call
in an eval
my $ret = eval { $m->...() };
And then check $@ for the error message
On 2017-05-26 02:08 AM, Peng Yonghua wrote:
greeting,
I am not so good at perl/modperl,:)
In the handler, a method from a class was
You can use mod_perl properly and write your self a request handler -
rather than using CGI scripts which handles the routing for you. I use
this model exclusively on my servers...
Most of the scripts are converted to action modules, which are
dynamically compiled by the handler (which acts
As I want to stay in the UK - I've been using bigV.io services from
bytemark - slighlty more expensive - and you have to set up from scratch
- but really nice VMs and not difficult to set-up - and I get to set
them up exactly as I want them
On 2017-03-09 04:04 PM, Vincent Veyron wrote:
You can look at Apache::SizeLimit as an alternative - this is designed
to cope with applications which occassionaly "leak memory"..
If one requests uses a lot of memory it will not be recovered -- Perl
doesn't hand this memory back - so subsequent requests are handled by
the inflated process.
We tend to now use Ubuntu LTS set ups for our webservers - currently a
mix of 12.04, 14.04 and 16.04 depening on which part of the production
cycle we are on (yes we have at least 60 for approx 120 different
websites)...
On 03/10/2016 18:09, John Dunlap wrote:
You're going to be better off
CGI.pm is still good - but i you are using modperl "properly" then it is
worth look at APR, which when you use CGI.pm under mod_perl it is what
is used under the hood... and is faster than CGI (one less level of
abstraction) although there is a minor bug in it - in that is broken if
you use
On 7/20/2016 4:04 PM, Steven Lembark wrote:
On Wed, 20 Jul 2016 11:55:24 +0800
yhp...@orange.fr wrote:
Though I have written several handlers using mp2, but for further web
development under modperl, what framework do you suggest to go with?
Q: What do you mean by "framework"?
(I have
On 7/19/2016 9:58 AM, yhp...@orange.fr wrote:
Jie,
I have been using Apache::DBI, but I don't think it is something like
JDBC.
Thankfully not - JDBC is one of the biggest nightmares our DBAs face -
if we have
network issues (firewall session timeout e.g.) we have had all sorts of
On 7/19/2016 4:26 AM, yhp...@orange.fr wrote:
so, will go for support of perl6?
Probably once it becomes more prevelant - the perl6 community is still
relatively small
{moving current perl 5 codebases to it will be none-trivial} and most
will not see the
gain from doing so... It will take
of webservers
James
On 6/14/2016 3:52 PM, John Dunlap wrote:
Though, if you have no control over what apps you have to support and
they are wirtten in multiple architectures... I can totally see where
you're coming from.
On Tue, Jun 14, 2016 at 10:48 AM, James Smith <j...@sanger.ac.uk
<ma
ovide them. We've
contained all mod_perl specific code to 2-3 files so that we have more
freedom to decide how and where our application will be deployed.
On Tue, Jun 14, 2016 at 10:37 AM, James Smith <j...@sanger.ac.uk
<mailto:j...@sanger.ac.uk>> wrote:
On 6/14/2016 3:28
On 6/14/2016 3:28 PM, John Dunlap wrote:
https://www.nginx.com/blog/nginx-vs-apache-our-view/
Unfortunately for us we actually use some of those 500 things that
apache is good at, that nginx doesn't do:
* Making use of all the handler/filter hooks in apache;
* Fronting a complex
ests is fundamentally
slower than Nginx and, consequently, Nginx scales better.
On Jun 13, 2016 6:54 AM, "James Smith" <j...@sanger.ac.uk
<mailto:j...@sanger.ac.uk>> wrote:
Just posted:
mod_perl is a much better framework that PSGI, FastCGI IF you make
use of the in
A job queue is also better because it stops un-controlled forking or
excessive numbers of "dead" web connections hanging around. It will just
queue requests until resources are available.. You may find handling
multiple of these jobs in parallel eats up all your processor/memory
resources..
I knew it was a problem - but due to our set up of front end proxy /
mod_perl then this wasn't an issue.. the mod_perl server handles the
filter - and the front end proxy does the gzipping (we use Brocade
Traffic Mangers and Apache in different places) - in most production
environments this is
perl -cw sometimes throws errors with mod_perl code - as it isn't
running in the Apache
environment...
I get the same warning testing my output filter handler when running
with -cw - but it
works well in Apache...!
On 10/1/2015 6:59 PM, A. Warnier wrote:
Hi.
I am trying to write an Apache2
John,
Sometimes it's difficult to see what the error is because you can't see
the request (doesn't get logged)
To get round this - add:
* a transhandler which writes a tag (e.g. ST), the request and the PID
to the error log
* a cleanuphandler which does the same... with a different tag
I agree with Randolf,
I have watched a number of projects move away from mod_perl - often to
Dancer/
Catalyst etc and then they ask can I do X, Y or Z...
I say if you were using mod_perl you could do that easily but usually
find the tool chain for
doing something similar in Dancer or
On 28/03/2015 19:54, Issac Goldstand wrote:
sendfile is much more efficient than that. At the most basic level,
sendfile allows a file to be streamed directly from the block device (or
OS cache) to the network, all in kernel-space (see sendfile(2)).
What you describe below is less effective,
You can effectively stream a file byte by byte - you just need to print
a chunk at a time and mod_perl and apache will handle it
appropriately... I do this all the time to handle large data downloads
(the systems I manage are backed by peta bytes of data)...
The art is often not in the output
Alan/Alexandr,
There will always be an overhead with using a webserver to do this -
even using mod_perl.
Assumiptions:
*from what you are saying that there is no actual website
involved but you want to use mod_perl to cache data for an offline process;
*One set of data is
On 23/11/2014 05:42, Ruben Safir wrote:
did you ever get this worked out.
I'm looking to use perl with my oracle set up. Any tips would be
appreciated.
I had similar problems Apache 2.2 with DBD::Oracle, after serious
debugging there
was a nasty environment variable issue - DBD::Oracle when
On 20/11/2014 22:39, John Dunlap wrote:
Could you give us a link to the documentation you are using?
On Thu, Nov 20, 2014 at 5:38 PM, worik worik.stan...@gmail.com
mailto:worik.stan...@gmail.com wrote:
Can't locate object method remote_ip via package
Apache2::Connection
You are
On 13/11/2014 15:43, Perrin Harkins wrote:
On Thu, Nov 13, 2014 at 10:29 AM, Xinhuan Zheng
xzh...@christianbook.com mailto:xzh...@christianbook.com wrote:
We don’t have any front end proxy.
I think I see the problem... ;)
If you use a front-end proxy so that your mod_perl servers are
Try:
use Apache2::Response ();
This should add the method to $r (a lot of the Apache2:: modules do this
- Apache2::RequestUtil, Apache2::Upload etc)
On 18/03/2014 16:16, John Dunlap wrote:
I've tried it with use Apache2::RequestRec; at the top of my handler
and without it. The outcome is
On 14/07/2011 11:39, Tim Watts wrote:
On 14/07/11 11:16, André Warnier wrote:
Hi Andre,
Thanks for the quick reply :)
(That would probably be difficult, inefficient or both)
Assuming that what you say about Tomcat is true (I don't know, and it
may be worth asking this on the Tomcat list), I
Igor Chudov wrote:
Guys, I completely love this discussion about cookies. You have really
enlightened me.
I think that letting users store cookie info in a manner that is secure
(involves both encryption and some form of authentication), instead of
storing them in a table, could possibly result
I have two handlers, one a response handler and a second an output filter.
If either of these handlers run then they run fine for any number of
requests, if I have both of these handlers I get an untraceable seg fault
with the handlers, this segfault happens on the second request to that
0x7f17ef71360d in main () from /usr/sbin/apache2
On Mon, 17 Aug 2009, James Smith wrote:
I have two handlers, one a response handler and a second an output filter.
If either of these handlers run then they run fine for any number of
requests, if I have both of these handlers I get an untraceable seg fault
Has anyone had experience of Apache output filters and mod_deflate - I'm
getting some strange behaviour if the apache output filter is generating
multiple buckets... and am looking for someone to give me some advice -
as using output filters and mod_deflate would be the perfect solution
for
André Warnier wrote:
.. and sorry again for sending directly to you. I keep forgetting
this list doesn't set this automatically.
James Smith wrote:
Has anyone had experience of using mod_perl OutputFilters with
mod_deflate, I've been banging my head against a brick wall today
I've learnt
Has anyone had experience of using mod_perl OutputFilters with
mod_deflate, I've been banging my head against a brick wall today
I've learnt a lot about bucket brigades - but for every two steps
forward it's one step back...
Scenario:
static page - being wrapped with an output filter -
Friday afternoon.
--
James Smith [EMAIL PROTECTED]
Texas AM University, College of Liberal Arts
Digital Humanities Lead Developer
979.845.3050
There are good reasons to store images (especially small ones) in
databases (and with careful management of headers in your mod_perl).
Some of you have missed inherent problems with the file systems
even balanced heirarchical tree - ones in a shared server
environment which can lead to gross
On Mon, 29 Sep 2008, Cosimo Streppone wrote:
In data 29 settembre 2008 alle ore 23:45:05, James Smith [EMAIL PROTECTED]
ha scritto:
There are good reasons to store images (especially small ones) in databases
(and with careful management of headers in your mod_perl).
Some of you have
On Tue, 30 Sep 2008, Cosimo Streppone wrote:
In data 30 settembre 2008 alle ore 00:09:52, James Smith [EMAIL PROTECTED]
ha scritto:
On Mon, 29 Sep 2008, Cosimo Streppone wrote:
In data 29 settembre 2008 alle ore 23:45:05, James Smith
[EMAIL PROTECTED] ha scritto:
There are good reasons
On Sun, 29 Jun 2008, Perrin Harkins wrote:
On Sat, Jun 28, 2008 at 9:48 AM, Jeff Peng [EMAIL PROTECTED] wrote:
But I have a question, does nginx support for session-keeping?
A user's request, should go always to the same original backend server.
Otherwise the user's session will get lost.
On Sun, 29 Jun 2008, Alexander Burrows wrote:
Hello again all. Been a while since I've posted here but needed some help on
a regex I was trying to write.
$line =~ tr/(\(|\)||)/(\#40;|\#41;|\lt;|\gt;)/g;
Simplest approach is to make a hash of the substitutions and use
an e executed regexp
Michael - depends on the OS - but you could look at the Apache::SizeLimit
code which allows kills processes when the memory per process gets large
works well for the system we use at work...
If on a unix/linux based system top is your friend as it will indicate
the memory usage per process
On Sat, 6 Jan 2007, Jonathan Vanasco wrote:
On Jan 6, 2007, at 7:39 AM, LUKE wrote:
Have anyone build static mod_perl and apache v2.0.59 successfully?
most people have long abandoned the static mod_perl route. its a
PITA to maintain ( you have to upgrade mp and apache at the same time )
Can you get away with using the apache logs to do this - use
mod_log_config and add save your information in a sub_process_env
variable - and add a %{my_env_var} entry into the logging directive?
James
On Fri, 22 Sep 2006, Jonathan wrote:
I need to introduce some new functionality to my
For the project I work on many of our Modules derive from a common
Root module which contains the following dynamic_use call which is
exactly the same as a use line - but does not fail fatally if the
module isn't there - it also nicely means that the code isn't
loaded up front (as if all blocks
On Fri, 4 Feb 2005, Denis Banovic wrote:
Hi Leo,
I have a very similar app running in mod_perl with about 1/2 mio hits a day.
I need to do some optimisation, so I'm just interessted what optimisations
that you are using brought you the best improvements.
Was it preloading modules in the
That's not entirely true. It is in fact the case that mod_perl's
*upper-bound* on memeroy usage is similar to the equivalent script
runnung as a cgi.
A well designed mod_perl application loads as many shared libraries as
possible before Apache forks off the child processes. This takes
80 matches
Mail list logo