On May 22, 6:15 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> On Fri, May 22, 2009 at 7:41 AM, m...@nysv.org 
> <markus.tornqv...@gmail.com>wrote:
>
> FWIW, the only other time I recall something like this coming up is here:
> http://groups.google.com/group/django-users/browse_thread/thread/4b9a...

Cool, but frightening :)

> You need to ensure that your multiple processes are not attempting to share
> a single database connection; whatever you are doing now is apparently
> resulting in them all trying to use a single connection.  You might try
> starting off your routine that you are running in parallel with a
> connection.close() (connection is in django.db) and seeing if that forces
> re-initialization of a new connection for each process.  Don't know if that
> will actually work, though.

That's what they're doing now; I tested closing the db connection and
less
surprisingly the program died on
"psycopg2.OperationalError: server closed the connection unexpectedly"

What I had time to hack together was a version where I call the
functions
(to be ran in separate processes) from a separate module.

This failed too, and even though I'm not surprised, I think it points
to the
direction that whatever I fork() off the original process will share
the
connection.

Maybe I'll still try Process objects instead of processing.Pool.imap()
to be safe..

Thanks!

--
mjt

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to