CGI zombies with Apache 1.3 on Linux

R

Robert Brewer

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.FieldStorage(keep_blank_values=True)
params = dict([(key, form[key].value) for key in form])

env = os.environ.get
filename = env('PATH_TRANSLATED') or env('SCRIPT_FILENAME')
username = env('AUTH_USER') or env('REMOTE_USER') or
env('LOGON_USER')
app = TibiaApp(params, filename, username)
print "Content-type: %s\n" % app.content_type
print "".join(app.output)


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
(e-mail address removed)
 
E

Erik Max Francis

Robert said:
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:

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top