[elephant-devel] sqlite backend, "Error 5 / database is locked"
Ian Eslick
eslick at csail.mit.edu
Wed Jul 25 13:44:28 UTC 2007
Are you using the SQLite data store in a multi-threaded application?
Robert, how did we resolve threading for CL-SQL data stores? This
sounds like a conflict where a second thread is accessing a db while
the first thread has the file locked. However this is just a
speculation.
Ian
On Jul 25, 2007, at 7:30 AM, woei at yandex.ru wrote:
> With sqlite backend from time to time I have error "Error 5 /
> database is
> locked"
> I have workarounded this by wrapping calls to cl-sql with
>
> (defmacro wrapper-submacro (name &rest q)
> `(loop
> (handler-case
> (return (,name , at q))
> (clsql:sql-condition ()
> (sleep .05)))))
>
> I think using sqlite3_busy_timeout call is more elegant solution.
> But calling sqlite functions via UFFI directly from elephant
> doesnt seem to
> be a good idea.
>
> Any suggestions?
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
More information about the elephant-devel
mailing list