[Welcome] [TitleIndex] [WordIndex

This is my first Wiki contribution, so if you note any screaming formatting issues, please feel free to doctor them up. Thanks, JS.

I've only added part of this information. I'm leaving the part about actually setting up a Win32 Service for someone who's actually done it [Done]. For the moment at least, I intend to record some of the potential problems (and solutions) that may be encountered AFTER that has been done.

Problem

You want to run a web app as a service on Windows and you'd like to use Quixote and Medusa (this could apply to Twisted, or anything else, as well) to provide the functionality.

There are a few problems one can encounter while trying to run this type of setup as a Win32 service. We'll go through them one at a time.

Problem: How do I make it run as a service?

Problem: No STDOUT

A Win32 Service does not have a STDOUT. Any attempt to write to STDOUT will throw an exception:

exceptions.IOError, [Errno 9] Bad file descriptor

Problem: Running past a user logout

I've read about this problem on the web, but have not personally verified it.

Apparently, it is sometimes a problem to get the service to continue running after the user who started it logs out. I would suppose that it may also be a problem to get it running when the machine boots in this case.


CategoryCookbook


2010-09-22 22:14