Re: [mp2] Logging separate child process

[prev] [thread] [next] [Date index for 2004/11/23]

From: Stas Bekman
Subject: Re: [mp2] Logging separate child process
Date: 04:58 on 23 Nov 2004
Maxim Nechaev wrote:
> Hi.
> 
> 
>   Not long time ago i migrate perl cgi application to mod_perl
> ModPerl::Registry. All ok, but sometime (about one time in a week) it
> work not so, as expected. There no error, no dies, but it behave like
> some portion of code not executed at all. I restart apache and there
> ok again. I can't define which order of execution bring to error.
>   Is there posibility to log each child proccess separately? I think,
> if i get to know which order of request processing off child proccess
> bring to this state, i can reproduce it and localize error.
>   What else i can do in this situation?

If you can afford running in a single server mode[1], then you could 
record all the requests and then reply them [2]. If you can't then set up 
a testing server (unless you have one already) and try to run requests 
randomly.

Another approach is to simply open a different filehandle for each 
childprocess and write each request there. Use $$ to differentiate between 
the processes.

In any case make sure that you use the latest mp2 version (1.17 as of this 
writing) and in the future always report problems as explained here:
http://perl.apache.org/bugs/. Thanks.

[1] httpd -DONE_PROCESS -DNO_DETATCH -DAPACHE2

[2]
http://search.cpan.org/~cnation/Monkeywrench-1.0/
http://search.cpan.org/~cbrooks/HTTP-RecordedSession-0.05/
http://search.cpan.org/~cbrooks/Apache-Recorder-0.07/

and probably others.



        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx 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

[mp2] Logging separate child process
Maxim Nechaev 02:22 on 23 Nov 2004

Re: [mp2] Logging separate child process
Stas Bekman 04:58 on 23 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52