Apache Process Tree

Discussion in 'Perl Misc' started by ++imanshu, Sep 15, 2008.

  1. ++imanshu

    ++imanshu Guest

    Hi,

    I have a mod_perl enabled Apache installation. When I start
    Apache and print the process id in the PerlHandler I see a process id
    14394.

    However none of the httpd processes that run in the end have this
    id :-

    % ps -ef | grep httpd | grep hgarg
    hgarg 14416 1 0 23:48 ? 00:00:00 httpd -f /home/hgarg/
    httpd.conf -DSYSTEST -DDEV
    hgarg 14417 14416 0 23:48 ? 00:00:00 httpd -f /home/hgarg/
    httpd.conf -DSYSTEST -DDEV
    hgarg 14418 14416 0 23:48 ? 00:00:00 httpd -f /home/hgarg/
    httpd.conf -DSYSTEST -DDEV

    I tried an strace but couldn't get the exact process tree of the
    processes. Also pstree didn't help because in the end 14394 doesn't
    exist. I am trying to understand the relationship of 14394 to the rest
    and the flow that leads to the latter. Please help.

    Thanks,
    ++imanshu
    ++imanshu, Sep 15, 2008
    #1
    1. Advertising

  2. ++imanshu

    ++imanshu Guest

    On Sep 15, 11:54 am, "++imanshu" <> wrote:
    > Hi,
    >
    >      I have a mod_perl enabled Apache installation. When I start
    > Apache and print the process id in the PerlHandler I see a process id
    > 14394.
    >
    >      However none of the httpd processes that run in the end have this
    > id :-
    >
    > % ps -ef | grep httpd | grep hgarg
    > hgarg    14416     1  0 23:48 ?        00:00:00 httpd -f /home/hgarg/
    > httpd.conf -DSYSTEST -DDEV
    > hgarg    14417 14416  0 23:48 ?        00:00:00 httpd -f /home/hgarg/
    > httpd.conf -DSYSTEST -DDEV
    > hgarg    14418 14416  0 23:48 ?        00:00:00 httpd -f /home/hgarg/
    > httpd.conf -DSYSTEST -DDEV
    >
    >      I tried an strace but couldn't get the exact process tree of the
    > processes. Also pstree didn't help because in the end 14394 doesn't
    > exist. I am trying to understand the relationship of 14394 to the rest
    > and the flow that leads to the latter. Please help.
    >
    > Thanks,
    > ++imanshu


    The process tree looks like this :-
    xterm(14099) --- tcsh(14101) --- httpd(14394) --- perl(14398)

    And a little later :-

    httpd(14416)+--httpd(14417)
    |--httpd(14418)

    Why is a new perl interpreter (14398) started. Isn't it built into
    httpd with mod_perl? And why does httpd(14394) die?

    Thanks,
    ++imanshu
    ++imanshu, Sep 15, 2008
    #2
    1. Advertising

  3. On Mon, 15 Sep 2008 00:43:49 -0700, ++imanshu wrote:
    > Why is a new perl interpreter (14398) started. Isn't it built into httpd
    > with mod_perl?


    It appears that your script isn't run using mod_perl but using mod_cgi. I
    think you should check your apache configuration.

    Regards,

    Leon Timmermans
    Leon Timmermans, Sep 15, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page