
Dear All,
This is one of the rather vague questions everybody (rightfully) hates, but if it's a generic problem somebody had encountered in the past, I'd assume he can spot the match.
I'm using Python 2.5, Twisted 8.1, web2 and its wsgi module -- under Win32.
Everything works like a charm when run as a normal application, but when running as a Win32 service using the win32service and win32serviceutil modules, spurious HTTP errors 500 are generated.
Another twisted server app I wrote which doesn't use web2 and wsgi doesn't show this problem.
Does this rings any bells?
Regards, Peter

On Thu, 8 Jan 2009 17:40:58 +0100, Peter Jacobi pjacobi.de@googlemail.com wrote:
Dear All,
This is one of the rather vague questions everybody (rightfully) hates, but if it's a generic problem somebody had encountered in the past, I'd assume he can spot the match.
I'm using Python 2.5, Twisted 8.1, web2 and its wsgi module -- under Win32.
Everything works like a charm when run as a normal application, but when running as a Win32 service using the win32service and win32serviceutil modules, spurious HTTP errors 500 are generated.
Another twisted server app I wrote which doesn't use web2 and wsgi doesn't show this problem.
Does this rings any bells?
Not with me. Are there no associated errors in the log file? Usually a 500 should come with a traceback.
Jean-Paul

Peter Jacobi wrote:
Dear All,
This is one of the rather vague questions everybody (rightfully) hates, but if it's a generic problem somebody had encountered in the past, I'd assume he can spot the match.
I'm using Python 2.5, Twisted 8.1, web2 and its wsgi module -- under Win32.
Everything works like a charm when run as a normal application, but when running as a Win32 service using the win32service and win32serviceutil modules, spurious HTTP errors 500 are generated.
I ran across something vaguely similar developing a server to run as a service. What I found out whas that win32serviceutil runs the server in its own directory, rather than the Python script's directory; my server looks for files in its own directory. I wound up using a registry setting to record the directory, and having the server use it to do a chdir.
This may have nothing to do with your problem, but FWIW...

On Thu, Jan 8, 2009 at 9:40 AM, Peter Jacobi pjacobi.de@googlemail.com wrote:
Dear All,
This is one of the rather vague questions everybody (rightfully) hates, but if it's a generic problem somebody had encountered in the past, I'd assume he can spot the match.
I'm using Python 2.5, Twisted 8.1, web2 and its wsgi module -- under Win32.
Everything works like a charm when run as a normal application, but when running as a Win32 service using the win32service and win32serviceutil modules, spurious HTTP errors 500 are generated.
Another twisted server app I wrote which doesn't use web2 and wsgi doesn't show this problem.
Does this rings any bells?
Regards, Peter
Twisted-web mailing list Twisted-web@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
Vague question deserves a vague answer.
With the very similar setup I have run into spurious errors trying to write to a Response. The amount of data and writing to a stream seemed to matter. For example:
resp = Response(mimetype='text/json') simplejson.dump(obj, resp)
was failing on occasion, but
Response(simplejson.dumps(obj), mimetype='text/json')
worked. Besides, like JP wrote, what the traceback says.
Waldemar
participants (4)
-
Don Dwiggins
-
Jean-Paul Calderone
-
Peter Jacobi
-
Waldemar Osuch