On Fri, Feb 21, 2014 at 02:00:01AM +0400, Alexey Shamrin wrote:

Hi,


> SQLite uses DELETE journaling mode by default. It became a problem on a
> real-world, actively used network (several hundred subscribers, several
> thousands SMS per day). Some location updates and SMS delivery marks
> were not getting written because database file was locked:
> 
> 2013-12-13_07:26:10.10665 <0002> gsm_subscriber.c:362 Subscriber 
> 334020422525672 ATTACHED LAC=3
> 2013-12-13_07:26:10.10668 <000d> db.c:170 DBI: 5: database is locked
> 2013-12-13_07:26:10.10865 <000d> db.c:969 Failed to update Subscriber (by 
> IMSI).

the answer right now is really not to access the database/tables from
outside. So the "fix" is really just a workaround and WAL does not come
for free either. In case you want to improve the database code please have
a look here[1]. In the long run our interface should be async, we should
use the DB APIs directly, use prepared statements, etc.

holger


[1] http://openbsc.osmocom.org/trac/wiki/Tasks/NITBAsyncDatabase


Reply via email to