kopikopiko wrote:
> 
> I run a standalone python programme (called kron) which looks for new
> events in the table and spawns a thread to process them:

This is exactly why you have the problem. It looks like you have a 
connection, which is shared across several threads. It's a no-no. This 
behavior is not related to Django. It's how databases work including MySQL.

Django itself creates one connection per thread. I know it works fine 
when threads are spawned by FastCGI or any other WSGI host --- it forces 
Django to re-initialize creating a connection in the process. I don't 
know how it is done outside of the web processing context.

If somebody knows how Django's ORM behaves on its own, please chime in. 
Otherwise we have to trace the connection's creation mechanism, and 
possibly fix it.

Thanks,

Eugene


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to