You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Roman Medina-Heigl Hernandez <ro...@rs-labs.com> on 2004/11/15 14:23:05 UTC

Strange error calling a handler

Hello,

I'm using mod_perl 1.29 with Apache 1.3.31 to invoke some perl modules
like ProxyRewrite.pm. When I restart apache daemon, all is working ok. But
when some time passes (it could be hours, days or weeks; it's variable)
the system reaches some kind of inestable state where any call to the
module returns an error, as the following:

[Fri Nov 12 15:32:05 2004] [error] Undefined subroutine
&Apache::ProxyRewrite::handler called.\n

Execution flow doesn't reach the module anymore (so it seems not to be a
failure in module's code). Note also that the error doesn't indicate where
the error really is (if it'd have something like "at line 333 of ..." I'd
have a clue). It could be a bug in mod_perl itself, when invoking the
module, I don't know.

The error is solved by restarting apache proccess, so it goes back to the
"stable" state. It's very strange.

How could I track this kind of error? Does it sound familiar to any of you?

Thanks in advance.

Regards,
-Roman




-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Strange error calling a handler

Posted by Stas Bekman <st...@stason.org>.
Roman Medina-Heigl Hernandez wrote:
> On Mon, 15 Nov 2004 19:37:08 -0500, you wrote:
> 
> 
>>try installing:
>>
>>use Carp;
>>$SIG{__DIE__} = \&Carp::confess;
> 
> 
> Where? In my perl module? How could you get this to run if the module
> is not executed? (that's at least what I suspect).

startup.pl or <Perl> sections.

>>Any difference if you preload this module at server startup?
> 
> 
> How could I do this? Anyway, the module is working during days/weeks,
> so I assume it is loaded.

I said "at the server startup", e.g.:

PerlModule Foo::Bar

in httpd.conf.

>>Try run with 'httpd -X' to reproduce it faster.
> 
> 
> It's a production server. Apart from this, I cannot wait for weeks to
> try to reproduce the failure!

You should have a dev machine where you can play with it. Save the 
sequence of requests and replay them on the dev machine to reproduce the 
problem. There is a bunch of CPAN modules for doing exactly that.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Strange error calling a handler

Posted by Roman Medina-Heigl Hernandez <ro...@rs-labs.com>.
On Mon, 15 Nov 2004 19:37:08 -0500, you wrote:

>try installing:
>
>use Carp;
>$SIG{__DIE__} = \&Carp::confess;

Where? In my perl module? How could you get this to run if the module
is not executed? (that's at least what I suspect).

>to see who called it. But most likely it's mod_perl that does the call 
>(since it's ::handler).

Exact.

>Have you tried to search the archives for similar errors?

Yes, I couldn't find anything.

>Any difference if you preload this module at server startup?

How could I do this? Anyway, the module is working during days/weeks,
so I assume it is loaded.

>Try run with 'httpd -X' to reproduce it faster.

It's a production server. Apart from this, I cannot wait for weeks to
try to reproduce the failure!


 Saludos,
 --Roman

--
PGP Fingerprint:
09BB EFCD 21ED 4E79 25FB  29E1 E47F 8A7D EAD5 6742
[Key ID: 0xEAD56742. Available at KeyServ]

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Strange error calling a handler

Posted by Stas Bekman <st...@stason.org>.
Roman Medina-Heigl Hernandez wrote:
> On Mon, 15 Nov 2004 16:04:59 -0500, you wrote:
> 
> 
>>Roman Medina-Heigl Hernandez wrote:
>>
>>>Hello,
>>>
>>>I'm using mod_perl 1.29 with Apache 1.3.31 to invoke some perl modules
>>>like ProxyRewrite.pm. When I restart apache daemon, all is working ok. But
>>>when some time passes (it could be hours, days or weeks; it's variable)
>>>the system reaches some kind of inestable state where any call to the
>>>module returns an error, as the following:
>>>
>>>[Fri Nov 12 15:32:05 2004] [error] Undefined subroutine
>>>&Apache::ProxyRewrite::handler called.\n
>>
>>Try:
>>http://perl.apache.org/docs/1.0/guide/troubleshooting.html#Undefined_subroutine__Apache__ROOT__perl__test_2epl__some_function_called_at
> 
> 
> I read it before posting to this list. But I think the error is far
> different. The URL you provided showes the line of the error. In other
> words, Apache tries to execute tool2.pl script:
> 
>   Undefined subroutine
>   &Apache::ROOT::perl::tool2::tool2_2epl::foo called at
>   /home/httpd/perl/tool2/tool2.pl line 4.
> 
> That's not my case.

Quite possible, I just wasn't sure you have read that already.

try installing:

use Carp;
$SIG{__DIE__} = \&Carp::confess;

to see who called it. But most likely it's mod_perl that does the call 
(since it's ::handler).

Have you tried to search the archives for similar errors?

Any difference if you preload this module at server startup?

Try run with 'httpd -X' to reproduce it faster.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Strange error calling a handler

Posted by Roman Medina-Heigl Hernandez <ro...@rs-labs.com>.
On Mon, 15 Nov 2004 16:04:59 -0500, you wrote:

>Roman Medina-Heigl Hernandez wrote:
>> Hello,
>> 
>> I'm using mod_perl 1.29 with Apache 1.3.31 to invoke some perl modules
>> like ProxyRewrite.pm. When I restart apache daemon, all is working ok. But
>> when some time passes (it could be hours, days or weeks; it's variable)
>> the system reaches some kind of inestable state where any call to the
>> module returns an error, as the following:
>> 
>> [Fri Nov 12 15:32:05 2004] [error] Undefined subroutine
>> &Apache::ProxyRewrite::handler called.\n
>
>Try:
>http://perl.apache.org/docs/1.0/guide/troubleshooting.html#Undefined_subroutine__Apache__ROOT__perl__test_2epl__some_function_called_at

I read it before posting to this list. But I think the error is far
different. The URL you provided showes the line of the error. In other
words, Apache tries to execute tool2.pl script:

  Undefined subroutine
  &Apache::ROOT::perl::tool2::tool2_2epl::foo called at
  /home/httpd/perl/tool2/tool2.pl line 4.

That's not my case.

 Saludos,
 --Roman

--
PGP Fingerprint:
09BB EFCD 21ED 4E79 25FB  29E1 E47F 8A7D EAD5 6742
[Key ID: 0xEAD56742. Available at KeyServ]


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Strange error calling a handler

Posted by Stas Bekman <st...@stason.org>.
Roman Medina-Heigl Hernandez wrote:
> Hello,
> 
> I'm using mod_perl 1.29 with Apache 1.3.31 to invoke some perl modules
> like ProxyRewrite.pm. When I restart apache daemon, all is working ok. But
> when some time passes (it could be hours, days or weeks; it's variable)
> the system reaches some kind of inestable state where any call to the
> module returns an error, as the following:
> 
> [Fri Nov 12 15:32:05 2004] [error] Undefined subroutine
> &Apache::ProxyRewrite::handler called.\n

Try:
http://perl.apache.org/docs/1.0/guide/troubleshooting.html#Undefined_subroutine__Apache__ROOT__perl__test_2epl__some_function_called_at


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html