Hi,
I was wondering how graceful restarts of apache interact with modperl
and "pre-loaded" modules.
Specifically, if the apache parent process loads module Foo.pm, and I
modify Foo.pm, can I use a graceful restart to get the apache parent
to read the new version of Foo.pm?
Thanks,
ER
I'm trying to use Smart::Comments with mod_perl. The problem is that
STDOUT and STDERR are blessed into the Apache class and they do not
have a TELL method. The Smart::Comments module has several references
to tell(STDOUT) and tell(STDERR).
Is there a way to implement a TELL method for these file
n Harkins wrote:
> On Wed, Jul 15, 2009 at 3:23 PM, E R wrote:
>> I'm trying to use Smart::Comments with mod_perl. The problem is that
>> STDOUT and STDERR are blessed into the Apache class and they do not
>> have a TELL method.
>
> I would have thought that the prob
Hi,
What's the best way to find memory leaks in a mod_perl app? I am
trying to use Apache::Leak with mod_perl 1.41
Some notes:
1. My mod_perl app is *HUGE*. Apache::Leak reports over 500,000 SVs. I
think the time it takes to traverse the symbol tables is long enough
to time out my browser (I'm s
Hi -
I am using mod-perl 1.3.41 with perl 5.8.9.
The only perl I have in my config file is:
warn "This is a section in process $$ at time @{[time]}\n";
sleep(5);
warn "Done sleeping\n";
When I start it up in single process mode (-X), I'll something like
this on stderr (to the console):
The sections don't seem to be executed in the children.
Is there a way to determine which pass you are in?
For large mod_perl apps, is there a way to avoid loading your code in twice?
Note I am using mod_perl 1.3.41.
Thanks,
ER
On Mon, Nov 16, 2009 at 4:41 PM, André Warnier wrote:
Hi,
I have a problem where a mod_perl handler will allocate a lot of
memory when processing a request, and this causes Apache to kill the
child due to exceeding the configure child size limit.
However, the memory allocated will get freed up or re-used by the next
request - I think the memory is j
as kind of a followup to my last question...
is there a way to determine this quantity: the amount of memory
malloc-ed minus the amount of memory free-ed? It seems that this would
be easy for malloc()/free() to keep track of.
I would like to compare that value with the process size to get an
idea
Hi all,
This is not exactly a mod_perl question - in fact I hope there is a
solution which does not use mod_perl.
I have a CGI script which generates a lot of output. Because it takes
a lot of time to the output, the results are cached in case the same
request is made again.
To serve the file th
Thanks for all of the suggestions. Looking for REDIRECT_* environment
variables seems like it will work for me.
2010/3/19 Torsten Förtsch :
> On Thursday 18 March 2010 21:59:26 E R wrote:
>> To serve the file the CGI script issues an internal redirect to a url
>> which point
I'm interested in adding a Comet capability to a (rather large)
mod-perl application.
To get around XSS limitations, the Comet service will have the same
host and port as the web service. However, I don't want a large
mod-perl process tied up performing the Comet service.
Is there a way that a we
Hello,
I'm building ancient versions of apache and mod_perl (with perl 5.8.9)
in the following way:
tar zxf apache_1.3.41.tar.gz
cd apache_1.3.41
./configure --prefix=/APACHE-PREFIX --enable-module=so
--enable-module=access (... more --enable-module) \
--disable-module=imap --disable-module=use
I'm trying to figure out how mod_perl and mod_rewrite work together.
This is with Apache 1.3.41, mod_perl 1.30, perl 5.8,9.
It seems that if there is a mod_perl handler installed at a location,
a mod_rewrite rule rewriting that location to another doesn't have any
effect.
Below is a sample httpd.
I've just run into this bug:
http://rt.perl.org/rt3/Public/Bug/Display.html?id=66224
Apparently it's been a problem for a while - first being reported in 2001:
http://marc.info/?l=apache-modperl&m=98839218229712&w=2
What would it take to resolve this - either by changing IPC::Open3 or
mod_perl o
I was wondering if anyone has come up with a solution to this problem:
1. You have a mod_perl application and use Log4perl for logging.
2. There is a module in your mod_perl app that you want to use outside
of the mod_perl environment (e.g. in a script run from the command
line)
3. That module use
Here's the problem I'm trying to solve:
I have a lot of mod_perl 1.x source code that uses Apache::Constants.
We have just moved to mod_perl2, and I'd like to be able to
compile-check the code on the command line. In our httpd.conf we are
using Apache2::compat so we don't have to change all the co
I have the following block in my httpd.conf file which installs
mod-perl handlers for a list of urls:
...
for my $uri (...) {
$Location{$uri} = ...;
}
If I wanted to move this code to a normal perl module, how should I
reference %Location?
Thanks,
ER
On Mon, Feb 28, 2011 at 4:41 PM, Jeff Nokes wrote:
> I've seen it done where you can make a home-grown module that has a second
> package declaration for Apache[2]::ReadConfig. Something like ...
Thanks, I've found that this works:
use Some::Module;
Some::Module::init(__PACKAGE__);
packa
Hi all,
On x86_64 I noticed that perl .so files (XS modules) appear to use a
lot more memory than they do on 32-bit architectures.
In particular, /proc/$$/smaps reports a ~ 2MB segment associated with
the .so library that is not reported in the 32-bit case.
For more details, see my posting to the
On Mon, Apr 11, 2011 at 3:43 AM, Dave Hodgkinson wrote:
> Are you using the A::S that's in the repo? It has fixes for calculating
> sizes...
Using RSS-SHARED instead of VSIZE-SHARED should fix the x86_64 issue I'm seeing.
But I've got some questions about Apache2::SizeLimit...
1. Are the docs a
Hi,
What's the proper way to read in the posted content from a request?
Using this Google code search:
http://www.google.com/codesearch?q=lang%3Aperl+%5C%24r-%3Eread.*length&hl=en
I see instances of:
$r->read($line, $r->headers_in->get('Content-length'));
and also loops like:
while ( $
Hi Torsten,
So is this what you are suggesting...
Define $MAX_SIZE to be the largest length of POSTed data you will accept.
For modperl <= 2.0.4 just use a single read and hope for the best:
$r->read($buf, $MAX_SIZE);
For modperl > 2.0.4 ( >= 2.0.5?) using this while-loop works:
my $buf =
Hi all,
I've been playing around with modperl and attributes. Below is the
module I am experimenting with.
When I start up the server I see the warnings coming from the
MODIFY_CODE_ATTRIBUTES routine.
However, when I fetch the url associated with the handler, it reports
that ATTRS = {}.
Moreover,
I am wondering how time spent in a cleanup handler affects page response time.
For instance, if I do a sleep(1) in a cleanup handler, will my page
delivery times be increased by a second?
Or will other available mod-perl child processes pick up pending
requests until the cleanup handler returns?
I was wondering if anyone had suggestions / recommendations for a
run-time application configuration mechanism for mod-perl apps. What I
am thinking of is simply a way to communicate new application settings
to all of the mod-perl children.
The only solution I can think of is to have all of the mo
2011/11/1 Torsten Förtsch :
> On Monday, 31 October 2011 22:28:32 E R wrote:
> ...
>> Any suggestions / recommendations or alternatives for a mod-perl
>> environment?
>
> Have a look at MMapDB on CPAN. ...
That's a very interesting module - thanks for the pointer!
Hi,
I have the need for a simple profiling capability for mod_perl applications.
At a few (< 50) points in my code I want to call something like:
$profiler->mark("some identifier");
and increment the counter for "some identifier". Later I want to be able to get
(through a web page) a summary (gr
On Nov 12, 2007 9:51 AM, Geoffrey Young <[EMAIL PROTECTED]> wrote:
> this should help:
>
> http://search.cpan.org/dist/Devel-Profiler/lib/Devel/Profiler/Apache.pm
The two problems I see with this package are:
1. I don't want to profile every single subroutine. In fact, I want to
profile only spec
On Nov 12, 2007 11:25 AM, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> i'm just tossing this idea out...
Thanks for the ideas. The main issue I'm trying to find a good
solution for is the collection of the profiling info from all the
child processes because occasionally I want to poll the stats i
I have a need to develop such an error-log analyzer but with real-time
analysis. The approach I am currently considering is to implement it
as a specialized web server so it can asynchronously process the log
messages and respond to requests for gathered statistics. I'd like to
write it all in perl
On Nov 16, 2007 10:42 AM, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
>
> On 16.11.2007 17:39 E R wrote:
>
> > On Nov 16, 2007 10:34 AM, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
> >> On 16.11.2007 17:08 Michael Peters wrote:
> >
> >> >
On Nov 16, 2007 10:08 AM, Michael Peters <[EMAIL PROTECTED]> wrote:
> Michael Lackhoff wrote:
> ...
> I'm not sure if that works when using $r->print() though.
mod_perl doesn't use Perl's filter layers. $r->print is an octet
sequence interface, so you have to perform the encoding yourself
before c
On Nov 16, 2007 10:34 AM, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
> On 16.11.2007 17:08 Michael Peters wrote:
> > binmode(STDOUT, ':utf8');
>
> that did the trick, many thanks!
>
> - Michael
Michael - what version of mod_perl are you using?
I want to send all error output to a process for specialized logging.
I know that you can use CustomLog with a pipe. However, will that
capture output from things like 'print STDERR ...' or if an XS module
directly writes to stderr? I need that output to also go to my logging
process.
Does anyone
One operational issue with this is that if the logger process dies,
existing httpd processes will get a SIGPIPE signal on subsequent
writes. Restarting the logger process does not restore the lost
connections.
On Fri, Apr 3, 2009 at 12:38 PM, Torsten Foertsch
wrote:
> On Fri 03 Apr 2009,
Hi Torsten,
On Sun, Apr 5, 2009 at 4:13 AM, Torsten Foertsch
wrote:
>
> And later on it does not check the return code when writing the log:
>
> httpd-2.2.11/server/log.c:682:
> apr_file_puts(errstr, logf);
> apr_file_flush(logf);
My concern is about what happens in this scenario:
When diving into a large code base and trying to understand how it
works, one thing that would be very helpful to know is how control
gets to a particular point in the code. That is, for a given
subroutine, what does the stack look like when the subroutine is
executed?
This is similar to what dtra
On Wed, Apr 8, 2009 at 3:23 PM, Andy Armstrong wrote:
>
> On Solaris and Mac OS you could actually use a dtrace-enabled Perl. You only
> get sub entry / exit but you can infer a call graph from that.
Thanks for the pointer to dtrace perl on Mac OS - now I've got a good
reason to upgrade to Leopa
38 matches
Mail list logo