Investigate repoze.mailin sqlite locks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KARL3 |
Fix Released
|
Medium
|
Tres Seaver |
Bug Description
We're still getting plagued with SQLite table locks on kdiab. We had a brief discussion with Tres identifying some things to look at.
From Email
==========
The following is the email exchange:
Paul Everitt wrote:
> Hi there. We're a bit wedged on repoze.mailin and the sqlite locks,
> no pun intended.
>
> This morning I checked to see why Will said mailin didn't work during
> tested. The database was locked. It was last locked the morning he
> started testing.
>
> The challenge is that we don't know what the problem is, and can't
> reproduce the problem. However, that puts us in a "do nothing" mode
> that won't really be acceptable.
>
> We could simply *guess* and say daemon-izing it would work. It's
> better than the status quo.
Is the current implementation running as a "one shot" from cron? If so,
we should do two things:
- - Ensure that the cron script uses a well-known dance to keep from
re-running the process if it is already running.
Doesn't currently do this, but...
- - Figure out if / why it is running so long.
I've never seen any evidence that it takes more than a few seconds to run. (Although there might be anecdotal field evidence that I haven't seen yet.)
- - If it is *not* running long, add some exception handling code
which ensures that the lock gets released even on some failure
case (which ought to be logged somewhere).
I implemented this in my first round of trouble shooting this a while back, although it's certainly worth an extra look to see if there's a leak somewhere.
Chris
Changed in karl3: | |
assignee: | nobody → chris-archimedeanco |
importance: | Undecided → Medium |
milestone: | none → m12 |
Changed in karl3: | |
status: | New → In Progress |
Shane, if you could also take this one. ChrisR knows the most about it, but I need to get him to work on migration. It appears you won't be starting on the unit tests for karl.peopledir today, so you have a bit of a gap in tickets.