No worries,
thanks !

I will try to investigate more and will post
here if I find the issue or solution.

Davo

On May 13, 10:43 am, Graham Dumpleton <[email protected]>
wrote:
> On 13 May 2010 19:37, Davo <[email protected]> wrote:
>
> > Hello Graham,
>
> > I tracked that as well to see if it is actually a zombie process or
> > not
>
> Sorry, isn't a zombie process then. Been too busy today to look at
> these emails properly. :-)
>
> I'll look again later when have time, maybe tomorrow or weekend though.
>
> Graham
>
>
>
> > See the following (ps -fH -u davo)
>
> > === Request to the WSGI is still running (timeout of 30 seconds not
> > reached yet) ======
> > UID        PID  PPID  C STIME TTY          TIME CMD
> > davo      2844  2834  0 11:29 ?        00:00:00
> > (wsgi:davo.com)              -k start
> > davo      3443  2844  0 11:34 ?        00:00:00   watch -n 5 echo aaa
>
> > === the request returned 500 error (normal timeout of 30 seconds...)
> > ===
> > UID        PID  PPID  C STIME TTY          TIME CMD
> > davo      3468  2834  4 11:35 ?        00:00:00
> > (wsgi:davo.com)              -k start
> > davo      3443     1  0 11:34 ?        00:00:00 watch -n 5 echo aaa
>
> > as you can see process PPID becomes 1,
> > hence it is now its own process. even if I stop apache it doesnt
> > change anything.
>
> > # apachectl stop
> > # ps -fH -u davo
> > davo      3443     1  0 11:34 ?        00:00:00 watch -n 5 echo aaa
>
> > On May 13, 2:24 am, Graham Dumpleton <[email protected]>
> > wrote:
> >> On 13 May 2010 02:01, Davo <[email protected]> wrote:
>
> >> > Hi all,
>
> >> > If I have a WSGI running as daemon mode and my python code is:
>
> >> > p = subprocess.Popen(['watch -n 5 echo "aaa"'],
> >> > stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
> >> > shell=True).communicate()[0].strip('\n')
>
> >> > The "watch" goes background and never ends. Even when I kill the wsgi
> >> > daemon it still exists and changes its PPID (parent ID) to 1 (which
> >> > means its becomes its own process instead of a child of any parent...)
> >> > is there a way to prevent this? Cleanup all the childs or something
> >> > when the daemon is restarted?
>
> >> That process is what is called a zombie process. See:
>
> >>  http://en.wikipedia.org/wiki/Zombie_process
>
> >> It doesn't consume any actual resources and is merely an entry in the
> >> operating systems process table which will exist until the process has
> >> been waited upon to get its exit status. The operating system should
> >> eventually forcibly reap process if parent doesn't.
>
> >> Graham
>
> >> --
> >> You received this message because you are subscribed to the Google Groups 
> >> "modwsgi" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to 
> >> [email protected].
> >> For more options, visit this group 
> >> athttp://groups.google.com/group/modwsgi?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "modwsgi" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/modwsgi?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/modwsgi?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to