[Twisted-web] wsgi vs win32service

Waldemar Osuch waldemar.osuch at gmail.com
Thu Jan 8 14:08:53 EST 2009

On Thu, Jan 8, 2009 at 9:40 AM, Peter Jacobi <pjacobi.de at 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 at 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.


More information about the Twisted-web mailing list