You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Manoj Bist <ma...@gmail.com> on 2008/03/03 06:58:58 UTC

Periodic random script failures - Need pointers

Hi,
I need help in figuring out why my mod perl registry script fails
randomly/periodicall on 'https'.
I am using modperl2 on ubuntu-dapper (libapache2-mod-perl2
2.0.2-2.3ubuntu1).

The registry script is used to login over https. The script
periodically/randomly gives internal error because in the following code
snippet $r is coming as undefined. This happens randomly but periodically.
Any pointers/insights to troubleshoot this would be greatly appreciated.


    my $r = Apache2::RequestUtil->request;
    my $host = $r->hostname        || $r->server->server_hostname;
*<===========
This fails randomly because $r is undefined.*

I am using mod-ssl
Thanks,

Manoj.

-- 
Tired of reading blogs? Listen to  your favorite blogs at
http://www.blogbard.com   !!!!

Re: Periodic random script failures - Need pointers

Posted by Adam Prime <ad...@utoronto.ca>.
André Warnier wrote:
> 
> Hi.  Don't take this as an expert response, but very superficially, I 
> can think of one kind of circumstance where "this happens randomly but 
> periodically" : if it would happen, for instance, at the first execution 
> of the script by a "new" apache child, freshly started.  Then as this 
> same child re-executes the script multiple times, $r would always be 
> defined, until that child dies and a new child initialises and executes 
> the script for the first time, etc..
> Of course there must be another underlying reason why $r is undefined, 
> but maybe the above can help thinking about it.

Actually, there are (at least) 2 old threads with similar intermittent 
failures related to not getting $r objects correctly.

http://marc.info/?l=apache-modperl&m=117816111524789&w=2

http://marc.info/?l=apache-modperl&m=114226565622372&w=2

I personally haven't seen this sort of thing under mp2 though, just mp1, 
and don't really have any real solution for it.

Adam

Re: Periodic random script failures - Need pointers

Posted by André Warnier <aw...@ice-sa.com>.

Manoj Bist wrote:
> Hi,
> I need help in figuring out why my mod perl registry script fails
> randomly/periodicall on 'https'.
> I am using modperl2 on ubuntu-dapper (libapache2-mod-perl2
> 2.0.2-2.3ubuntu1).
> 
> The registry script is used to login over https. The script
> periodically/randomly gives internal error because in the following code
> snippet $r is coming as undefined. This happens randomly but periodically.
> Any pointers/insights to troubleshoot this would be greatly appreciated.
> 
> 
>     my $r = Apache2::RequestUtil->request;
>     my $host = $r->hostname        || $r->server->server_hostname;
> *<===========
> This fails randomly because $r is undefined.*
> 


Hi.  Don't take this as an expert response, but very superficially, I 
can think of one kind of circumstance where "this happens randomly but 
periodically" : if it would happen, for instance, at the first execution 
of the script by a "new" apache child, freshly started.  Then as this 
same child re-executes the script multiple times, $r would always be 
defined, until that child dies and a new child initialises and executes 
the script for the first time, etc..
Of course there must be another underlying reason why $r is undefined, 
but maybe the above can help thinking about it.