2012/2/27 Roberto De Ioris <[email protected]>

>
> > Hello list,
> >
> > I've just subscribed to the list looking for help with an issue I'm
> having
> > on a setup with uWSGI + TurboGears
> > when enabling multiple workers on uwsgi.ini
> >
> > I was using uwsgi 1.0.2.1 but upgraded to 1.0.4 and the problem is still
> > there:
> >
> > 'ProgrammingError: Commands out of sync; you can't run this command now'
> >
> > Full backtrace:
> > http://dpaste.com/708425/
> >
> > Turbogears version is 1.5.1
> > SQLObject version was 0.11.0 so tried upgrading to 1.2.1 but the problem
> > persists.
> >
> > My uwsgi.ini follows:
> >
> > [uwsgi]
> > socket = /var/run/vodo/uwsgi-staging.socket
> > pidfile=/var/run/vodo/uwsgi-staging.pid
> > wsgi-file = /srv/staging/vodo-net/vodo_uwsgi-staging.py
> > daemonize = /var/log/vodo/staging/uwsgi.log
> > enable-threads = false
> > chmod-socket = true
> > virtualenv = /srv/staging/staging-venv
> > master = true
> > processes = 10
> >
> > If I remove the 'processes = 10' line, it works fine.
> >
> > Any tips much appreciated.
> >
> >
>
>
> It is a bit of time i do not use SQLObject, but i bet it is not
> copy-on-write frindly. Add
>
> lazy = true
>
> in your config.
>
> In such a way, your app will be initialized after each worker spawn (and
> not before and then copied)
>
>
Excellent Roberto! Thanks a lot, this fixed the problem.

However I see only this 'switches' on the uwsgi log:

(148 switches on core 0)

During some previous tests (while it was failing with 'commands out of
sync') I remember to have seen switches on different cores.

Does this mean uwsgi is using just one core or is it already using multiple
cores?
I have 8 cores on this machine.

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

Reply via email to