Christian Boos wrote:
Christopher Lenz wrote:
Hi folks,

I've just upgraded projects.edgewall.com to Trac 0.10dev (r2300).

I got a ''Database is locked'' error just now on p.e.c.
While I think it was not a bug per se, I have two remarks:

Wait a minute, I'm really seeing this far too often to be
qualified as "normal" (not to mention the Internal Error I saw too...)

Could it be an interaction with the akismet SpamFilter?

User       p.e.c     akismet
----       -----     -------
ticket
change  -> process
          request
            ...   -> validates
                       ...
          finish  <-
result  <-


During the time span between process request/finish on p.e.c,
no other write operation can be attempted...

Maybe deleting the db before attempting validation
would help (patch attached).

-- Christian

Index: web_ui.py
===================================================================
--- web_ui.py   (revision 3209)
+++ web_ui.py   (working copy)
@@ -238,6 +238,7 @@
             else:
                 # Use user supplied values
                 ticket.populate(req.args)
+                del db
                 self._validate_ticket(req, ticket)
 
                 req.hdf['ticket.action'] = action
@@ -252,12 +253,13 @@
                     # Wiki format a preview of comment
                     req.hdf['ticket.comment_preview'] = wiki_to_html(comment,
                                                                      self.env,
-                                                                     req, db)
+                                                                     req)
         else:
             req.hdf['ticket.reassign_owner'] = req.authname
             # Store a timestamp in order to detect "mid air collisions"
             req.hdf['ticket.ts'] = ticket.time_changed
 
+        db = self.env.get_db_cnx()
         self._insert_ticket_data(req, db, ticket, reporter_id)
 
         # If the ticket is being shown in the context of a query, add
_______________________________________________
Trac-dev mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-dev

Reply via email to