[uWSGI] Problem with multiple processes with httplib.HTTPConnection?

Roberto De Ioris roberto at unbit.it
Wed Nov 10 06:16:20 CET 2010

> Roberto,
> I posted this situation on the sqlalchemy google group and I got the
> following answer:
> "DBAPI connections don't travel well over process boundaries.  You need to
> call create_engine() inside each new child process."
> I saw that the create_engine gets called only once and then the workers
> spawns... Is this a simple thing to do in uWSGI, like a 'process start
> callback' or 'per process app initialization'.
> Since I didn't see a fast way to develop this, i created a uwsgi cluster
> in
> nginx and tested it again. And guess what? It worked as a charm!
> Well this was a quick setup, tomorrow I'll do more tests on this.
> Thanks Roberto!
> Regards

Hi Alan, use this patch


it will be included in the next maintainance release so it is well tested
and already used in production.

Roberto De Ioris

More information about the uWSGI mailing list