Re: timeout parameter

Christian Boos <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
Ed Pasma wrote:
> andychambers2002-/[email protected] wrote:
>   
>>> An error is thrown immediately if a deadlock situation is detected by
>>> SQLite. If that's not what happened, can you post your test scripts?
>>>       
>> I think that must be what happened.  I was locking the database by
>> opening a transaction in a sqlite session like so...
>>
>>     $ sqlite
>>     
>>> begin
>>> insert into readings (1, 1);
>>>       
>
> Hello, amazing how easy a deadlock situation can occur. Two users  
> issuing above statements is enough. Can anybody tell it this is a  
> problem in track and, if so, how it is handled?
>   

Assuming you meant "Ttac", see http://trac.edgewall.org/ticket/3446.
As you can see, there still some head scratching about how we could 
improve the situation with locks within Trac...

> I guess the duration of a transaction will not be longer then the  
> handling of a single http request.
>   
Requests in Trac can be quite long, queries with hundreds of tickets, 
text searches in the whole db, long timeline span. On average, each 
request is about 1-4 seconds.
> Does it use the default isolation_level?
>   
Yes.
> Is the error handled programattically?
>   
Yes, we catch this kind of error and invalidate all the opened cursors 
for this connection, so that the other connections could succeed. With 
recent pysqlite versions, this is probably not needed anymore, but we 
did that at the time of pysqlite 2.0.3 or 2.0.4.
> Thanks in advance, Edzard
>   
I hope I was not off-topic ... ;)

-- Christian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.