CGI zombies with Apache 1.3 on Linux

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert Brewer

    CGI zombies with Apache 1.3 on Linux

    I've Googled extensively, but can't figure out what might be causing my
    Python CGI app to zombie (yes, Tibia, the one I just announced ;). The
    cgi bit looks like this:


    def cgi_handler():
    import cgi

    form = cgi.FieldStorag e(keep_blank_va lues=True)
    params = dict([(key, form[key].value) for key in form])

    env = os.environ.get
    filename = env('PATH_TRANS LATED') or env('SCRIPT_FIL ENAME')
    username = env('AUTH_USER' ) or env('REMOTE_USE R') or
    env('LOGON_USER ')
    app = TibiaApp(params , filename, username)
    print "Content-type: %s\n" % app.content_typ e
    print "".join(app.out put)


    if __name__ == '__main__':
    cgi_handler()



    Should I be explicitly closing stdout at the end of cgi_handler()? I
    don't get a zombie with every request.



    Robert Brewer
    MIS
    Amor Ministries
    fumanchu@amor.o rg
  • Erik Max Francis

    #2
    Re: CGI zombies with Apache 1.3 on Linux

    Robert Brewer wrote:
    [color=blue]
    > I've Googled extensively, but can't figure out what might be causing my
    > Python CGI app to zombie (yes, Tibia, the one I just announced ;). The
    > cgi bit looks like this:[/color]

    Zombies are caused by forking a subprocess and the parent not waiting on
    it. Does your system (sometimes) spin off a subprocess?

    --
    Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
    San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
    Defeat is a school in which truth always grows strong.
    -- Henry Ward Beecher

    Comment

    Working...