Background:

I have a small application that I have developed as a Windows Service that
is built with the following major libraries:

Python 2.6.7
Win32 217
py2exe 0.6.9

(Also WMI, SQLAlchemy, anyjson, psycopg2, etc)

The application is designed as a class that extends threading.Thread.  The
class runs great as a frozen executable, and on a booted Windows XP 32bit
system starts correctly.

I am having an issue on a Windows XP 32bit system at boot time however.
 The eventlog logs these messages:

Source: Service Control Manager
Event ID: 7009

Description:
Timeout (30000 milliseconds) waiting for the MyAppName service to connect.


Source: Service Control Manager
Event ID: 7000

Description:
Timeout (30000 milliseconds) waiting for the MyAppName service to connect.

On a local virtual machine (SSD, quad core I7) this issue does not happen
unless I seriously CPU constrain the VM (~20% CPU limit in VirtualBox).
 Between it working *after* boot, and working fine on a fast system it
seems to be related to service load order.

I have tried setting a 'dependency' on 'lanmanworkstation' and 'eventlog'
in an attempt to delay startup.

The service wrapper script is based on the example in
examples\advanced\service.py, and writes to the eventlog.  During testing
it appears that simply *importing* my main class will cause the application
not to start, while excluding the import (and just sticking to the example
service.py) allows it to start.  With my include in place, no eventlog
messages are logged.

Does anyone have any approach for debugging a problem like this?  I spent
most of the weekend progressively allowing more imports and thought I had
solved the problem (in a test VM), but the issue persisted on a physical
Windows XP machine.

Stan
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to