Hey all :)

I'm running into an issue with uwsgi-1.1.1 on Mac OS X 10.7.3, using Python.

Current setup (narrowed down from what I actually want, to make tracking down 
this issue easier):
- one vassal in emperor mode: 40 threads, 5 processes, master == true.

The vassal runs the simplest WSGI-app from a module:

def application(environ, start_response):
    status = '200 OK'
    response_headers = [('Content-type','text/plain')]
    start_response(status, response_headers)
    return ['Hello world\n']

What I want: use @timer to periodically run a function.

However, whenever I add a @timer (either by decorator, or manually using 
uwsgi.add_timer), things start crashing:

Tue Mar 27 18:59:04 2012 - uWSGI worker 3 screams: UAAAAAAH my master died, i 
will follow him...

It doesn't seem to matter where I initialize the timer: in the same module as 
the application, or in a different module using 'pyimport', same issue occurs.

The fine manual states: "The best way to register signals, is defining them in 
the master". Is there a way to explicitely do that? BTW, changing 'processes' 
to 1 fixes the issue too, so it seems that the workers are caught by surprise 
when they receive the signal.

My actual goal: I'm running multiple Django installs in Emperor mode, which in 
itself works great. However, I want to implement Django's "reload when a file 
changes" using a @timer, which bombs (an alternative from using a timer is to 
use Django's request_started hook or something to check for changes).

-- robert

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to