#9409: "OperationalError: database is locked" with Python 2.6 multiprocessing 
and
SQLite backend
------------------------------------+---------------------------------------
          Reporter:  mrts           |         Owner:  nobody
            Status:  reopened       |     Milestone:        
         Component:  Documentation  |       Version:  1.0   
        Resolution:                 |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Comment (by anonymous):

 Replying to [ticket:9409 mrts]:

 I've been having this same issue after switching from parallel python (pp)
 to multiprocessing under 2.5 using psycopg2 -- under heavy load I get the
 error `InternalError: SET TRANSACTION ISOLATION LEVEL must be called
 before any query` (usually, though it can vary).  As near as I can tell,
 this is an issue caused by multiple processes using the same database
 connection; it seems if I import a model or `db.connection` anywhere and
 then run worker processes, the imports aren't "redone" (even if explicitly
 added as imports in the worker function) which leads to multiple processes
 using the same db connection which of course leads to them stepping on
 each other trying to make queries.

 I'm not entirely sure they're caused by the same thing, but I figured I'd
 annotate it here anyway.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9409#comment:13>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to