For httpd.conf in Apache 2.x / mp2, does it matter if I insert a
handler in the main server section vs. a virtual host section? My
question pertains specifically to performance/memory, as I already
understand the logical implications.
PerlChildInitHandler +MyStuff::InitHandler
vs.
PerlChi
That's helpful information... I guess I'll stick with the DSO.
At one point I did benchmark mod_perl2 with vs. without threads, and
without threads was marginally faster. I've since started using some
new CPAN modules, so I'll have to double-check that none of them use
Perl threads.
thanks!
JB
In anticipation of upgrading my mp2 build to the latest/greatest, I
would like to consider switching from a DSO build to a static build.
Could folks here offer their opinions on pros/cons in terms of
performance/memory, etc? FYI my environment is httpd 2.0.55, prefork
MPM, Perl 5.8.6 (w/threads),
I've made great use of $r->pnotes, and now finding myself in need of a
similar way to stash objects within the connection object. While
there are regular 'notes' offered by the connection ($c->notes),
unfortunately there is no 'pnotes'. Any suggestions for a workaround?
The requirement is as fol
I think the only conclusive answer is to try both and benchmark
them... there may be some generalizations one can make about memory,
hook/subroutine invocation overhead, etc., but ultimately you need to
test both methods to see which is faster. And please share your
findings if you decide to do t
Yikes indeed :)
I should have clarified that in our app we don't actually process
embedded tags. Our app lets users mangle the source HTML using RegEx,
and since users can (and often do) perform filtering like
s/()(.*?)(<\/body>)/$1$2<\/center>$3/, we need to buffer
it all.
The main benefit I se
The way to deal with this is to buffer as much content as you need
(maybe the whole page) and then do your work on the buffer. Our
application (HTTP output filter) buffers the stream as we go and
stores it on the filter context ($f->ctx) across filter invocations.
When we've seen $f->eos, then we
Ok, that worked... my only gripe is that it doesn't correctly parse
the type for a WinZip (.zip) file! Oh well...
thanks :)
JB
On 9/23/05, John ORourke <[EMAIL PROTECTED]> wrote:
> Geoffrey Young wrote:
> > http://search.cpan.org/dist/File-MMagic-XS/
Through my MP2 handler, I need to be able to set Content-Type based on
the extension of any file that I'm reading from disk and then writing
to the client. I'd like to somehow (programmatically) map from file
extension to MIME type, and it seems like Apache's mime.types file is
a good place to do
M as the size of the table! (?!) I suppose a workaround
would be to do multiple select's for different key ranges, and print
out each subset iteratively.
JB
On 9/22/05, Malcolm J Harwood <[EMAIL PROTECTED]> wrote:
> On Thursday 22 September 2005 11:06 am, Jeff Ambrosino wrote:
&g
I'm exporting a database table through a mod_perl2 handler. The
problem is that for large tables, the size of the httpd process
balloons to consume alot of RAM. For example, a 299mb MySQL table
(size of .MYD file), which creates a 35mb export, causes httpd to
consume about 220mb of RAM!
My code
I've observed recurring hung Apache children in my mod_perl http output filter.
The problem is intermittent, and while I can't cause it to happen, our site gets
alot of traffic and the problem is happening 10+ times per day. The immediate
impact is that the page requested never gets served to the
some backtraces
and then head over to http-dev and/or mod_ssl lists. Any last-ditch advice from
MP folks would be welcome, but not expected since this doesn't appear
to be a MP/Perl
issue (although it could be libapreq since I believe mod_ssl uses that.)
thanks
Jeff
On 9/8/05, Jeff Ambrosino
n http output filter that processes the proxied response (and
unfortunately the mod_proxy list is basically dead).
thanks
JB
On 9/8/05, Jeff Ambrosino <[EMAIL PROTECTED]> wrote:
> Hi mod_perl folks,
>
> I'm getting occasional hanging httpd children (prefork) that suck up
>
Hi mod_perl folks,
I'm getting occasional hanging httpd children (prefork) that suck up
alot of CPU and
bog down my server. When I inspect Apache Status (ExtendedStatus On), I see
something like this:
434-3 11031 0/29/612 R 0.49 1341 0 0.0 0.20 4.09 ? ? ..reading..
There's no client IP, no vi
Yup, that works great.
thanks!
JB
On 9/1/05, Geoffrey Young <[EMAIL PROTECTED]> wrote:
Jeff Ambrosino wrote:> I'm running a mod_perl cleanup handler from a reverse proxy> ($r->pool->cleanup_register), and> I need to know the total # of bytes sent in a response so I
I'm running a mod_perl cleanup handler from a reverse proxy ($r->pool->cleanup_register), and
I need to know the total # of bytes sent in a response so I can store this info in a database.
A real-world example would be the end user (browser) streaming a Quicktime movie, and I want
to know how long
We have the need to delete a specific Set-Cookie header found in the
reponse within a reverse proxy [Apache2, libapreq2, mod_perl2,
mod_proxy with an HTTP output filter]. Looking at the docs for
APR::Table [1] it doesn't appear that this is possible. Although you
can "unset" and "delete" based on
Ok, this is going to be tough for me to test because I'm still on RC4,
so it's not yet converted to the new Apache2 naming. I'll still try
to make/test the svn snapshot, though (which also gives me a good
reason to get more familiar with subversion.) I'll email what I find
out.
thanks Stas!
Jef
If, by chance, you also have use for a general purpose templating
system, I've had great luck with Template-Toolkit
(www.template-toolkit.org.) Among [many] other things, it embeds GD
so you can write little templates that slurp in the data and produce
graphics with graphs, charts, etc. The learn
I've had some similar issues, but gotten around them by using
erro_headers_out. This worked for me, so you might give it a try:
$f->r->headers_out->unset('Content-Length');
$f->r->err_headers_out->set('Content-Length' => length($NewBody));
Obviously "$NewBody" is whatever you're
the
error by myself, I know when our scanning service will do so, and I
could put some additional code in place to watch for it. If there are
additional debug/traps that you could suggest, I'd like to try. Any
ideas?
thanks
Jeff
On 5/2/05, Stas Bekman <[EMAIL PROTECTED]> wrote:
&g
>From within an existing Perl handler/filter, you can dynamically
insert ('register') a new filter with the add_output_filter method on
the request object:
$r->add_output_filter(\&callback);
And, you can remove a downstream filter (from within an upstream filter) with:
$next_f = $f->next;
$next_
Ok, I tried this approach, and it only partially worked; unfortunately
my httpd procs are still dying, and APR::Error doesn't seem to pass
anything. Here's the error I got _before_ wrapping $f->print in the
eval:
[Sun May 01 05:12:21 2005] [error] [client X.X.X.X]
Apache::Filter::print: (104
Actually, it looks like using APR::Error [1] and wrapping $f->print in
an eval would do the trick...?
Jeff
[1] http://perl.apache.org/docs/2.0/api/APR/Error.html
On 5/1/05, Jeff Ambrosino <[EMAIL PROTECTED]> wrote:
> [Sun May 01 05:12:21 2005] [error] [client X.X.X.X]
> Apache
I've got an HTTP output filter running on mp2-RC4 + httpd2.0.54 +
libapreq2-2.04_03-dev, and occasionally I see these messages in my
error_log:
[Sun May 01 05:12:21 2005] [error] [client X.X.X.X]
Apache::Filter::print: (104)Connection reset by peer at
/var/httpd/lib/perl/MyOutputFilter.pm line
453
I'm logging some closure to this one... I was able to get this to
work by modifying the priorities of
mod_perl/src/modules/perlmod_perl.c's http output filter to
AP_FTYPE_CONTENT_SET-1, and then
httpd-2.0.53/modules/experimental/mod_cache.c's cache_save and
cache_out filter to AP_FTYPE_CONTENT_SET
>From looking at the code, it appears that I may need to modify
mod_perl and either
of mod_cache or mod_deflate:
mod_perl.c - line ~839
--
ap_register_output_filter(MP_FILTER_REQUEST_OUTPUT_NAME,
MP_FILTER_HANDLER(modperl_output_fil
Thanks for the reply Geoff... that isn't quite the problem. Here's a
further explanation that should better articulate it.
I've turned on debug on Apache, and this is what's currently happening
when content is found in the cache:
[Fri Apr 01 14:14:13 2005] [debug] mod_disk_cache.c(371): disk_ca
Hi mod_perl folks,
background: I have an http output filter working on Apache 2.0.53 with
mod_proxy, mod_cache, deflate and mod_perl 2.0.0-RC4. My functionality
is that I'm stripping out certain types of advertising content, IMG
tags, etc.
The problem I'm seeing is that if a request can be fulfi
30 matches
Mail list logo