On Tue, Mar 13, 2012 at 2:38 PM, Roberto De Ioris <[email protected]> wrote:
>
>> Hey everyone,
>>
>> I'm having some issues with uWSGI 1.0.6 executing the cron a little
>> more than I expect it to.  For example, I have a method decorated by
>> @cron(0, 16, -1, -1, -1).  Typically, I would expect this to execute
>> the method once at 16:00, but instead, it will execute it 2 or 3
>> times.  Here's what it looks like around that time in my logs:
>>
>> [uwsgi-signal] you have registered this signal in worker 9 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 10 on worker 12
>> [uwsgi-signal] you have registered this signal in worker 15 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 15 on worker 12
>> [uwsgi-signal] you have registered this signal in worker 11 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 21 on worker 12
>> [uwsgi-signal] you have registered this signal in worker 6 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 24 on worker 12
>> [uwsgi-signal] you have registered this signal in worker 5 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 26 on worker 12
>> [uwsgi-signal] you have registered this signal in worker 14 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 28 on worker 12
>> [uwsgi-signal] you have registered this signal in worker 16 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 32 on worker 1
>> [uwsgi-signal] you have registered this signal in worker 10 memory
>> area, only that process will be able to run it
>> [uwsgi-signal] you have registered this signal in worker -1 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 34 on worker 3
>> Mon Mar 12 16:00:00 2012 - error managing signal 36 on worker 1
>> [uwsgi-signal] you have registered this signal in worker 1 memory
>> area, only that process will be able to run it
>> [uwsgi-signal] you have registered this signal in worker 13 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 39 on worker 3
>> Mon Mar 12 16:00:00 2012 - error managing signal 41 on worker 1
>> [uwsgi-signal] you have registered this signal in worker 8 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 45 on worker 1
>> [uwsgi-signal] you have registered this signal in worker 7 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 47 on worker 1
>> [uwsgi-signal] you have registered this signal in worker 2 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 49 on worker 1
>> [uwsgi-signal] you have registered this signal in worker 4 memory
>> area, only that process will be able to run it
>> Mon Mar 12 16:00:00 2012 - error managing signal 51 on worker 1
>>
>> As you can see, three of my workers (12, 3, and 1) are trying to get
>> this guy executed all at the same time.  I'm not sure what's up with
>> the "error managing signal" errors.. the cron is successfully executed
>> for each worker.
>>
>> Any ideas?
>>
>>
>
> Looks like you are using --lazy option or registering crons in a request.

I'm not using the --lazy option, here is my config:

command=/opt/webapps/www.foo.com/bin/uwsgi
  --master
  --processes 16
  --memory-report
  --harakiri 7200
  --vacuum
  --enable-threads
  --cache 1000
  --import foo-app.custom.uwsgi_utils
  --spooler /opt/webapps/www.foo.com/spooler
  --home /opt/webapps/www.foo.com/
  --pythonpath /opt/webapps/www.foo.com
  --spooler-import foo-app.custom.uwsgi_utils
  --socket /opt/webapps/www.foo.com/sock/uwsgi.sock
  --pidfile /opt/webapps/www.foo.com/pid/wsgi.pid
  --wsgi-file /opt/webapps/www.foo.com/django.wsgi

custom.uwsgi_utils.py is where the cron methods are, I don't believe
I'm registering them in any request...

>
> If you are using --lazy, put the @cron decorated functions in a dedicated
> module, and import it on uWSGI startup with --pyimport <file/module>
> option
>
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to