[Ur] sqlite, sequence, database is locked

Austin Seipp aseipp at pobox.com
Tue Feb 28 13:28:50 EST 2017


An alternative might be to turn on WAL mode for your SQLite database. This
will allow
readers and writers (SELECT and INSERTs) to proceed concurrently and might
alleviate
this problem for you, without having to do some kind of heuristic backoff.

(Perhaps Ur/Web should enable WAL by default in the Schema it generates for
SQLite)

On Tue, Feb 28, 2017 at 11:42 AM, Sergey Mironov <grrwlf at gmail.com> wrote:

> Hi. My sqlite-based application uses sequences during GET processing.
> AFAIK sequences are implemented as INSERTs for sqlite backend, so I
> think the question is about generic sqlite behavior.
>
> In my application, some transactions take a considerable time to
> produce a page. During the process, other requests, even those which
> only access sequences, are denied with 'Database is locked' error. Is
> it possible to treat the sqlite locking error as a 'Bounded error'
> rather than to terminate the request immediately? By bounded error I
> mean to attempt to process transaction several times after certain
> delay. What are possible negative effects of such a modification?
>
> Regards,
> Sergey
>
> _______________________________________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
>



-- 
Regards,
Austin - PGP: 4096R/0x91384671
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20170228/aa982092/attachment.html>


More information about the Ur mailing list