android icon indicating copy to clipboard operation
android copied to clipboard

Databse is locked

Open Craeckie opened this issue 5 years ago • 2 comments

Whenever I change something, I get this error on the next sync:

EXCEPTION:
android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY[5])
        at android.database.sqlite.SQLiteConnection.nativeExecute(Native Method)
        at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:759)
        at android.database.sqlite.SQLiteSession.endTransactionUnchecked(SQLiteSession.java:437)
        at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:401)
        at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:724)
        at io.requery.android.sqlite.SqliteConnection.commit(SqliteConnection.kt:72)
        at io.requery.sql.ConnectionTransaction.commit(ConnectionTransaction.java:141)
        at io.requery.sql.ThreadLocalTransaction.commit(ThreadLocalTransaction.java:76)
        at io.requery.sql.TransactionScope.commit(TransactionScope.java:52)
        at io.requery.sql.EntityDataStore.insert(EntityDataStore.java:207)
        at io.requery.sql.EntityDataStore.insert(EntityDataStore.java:192)
        at com.etesync.syncadapter.syncadapter.SyncManager.persistSyncEntry(SyncManager.kt:308)
        at com.etesync.syncadapter.syncadapter.SyncManager.pushEntries(SyncManager.kt:423)
        at com.etesync.syncadapter.syncadapter.SyncManager.performSync(SyncManager.kt:171)
        at com.etesync.syncadapter.syncadapter.ContactsSyncAdapterService$ContactsSyncAdapter.onPerformSyncDo(ContactsSyncAdapterService.kt:57)
        at com.etesync.syncadapter.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:112)
        at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:334)

SOFTWARE INFORMATION

EteSync version: 1.12.0 (107) 
Installed from: com.google.android.packageinstaller
CONFIGURATION
Power saving disabled: yes
android.permission.READ_CONTACTS permission: granted
android.permission.WRITE_CONTACTS permission: granted
android.permission.READ_CALENDAR permission: granted
android.permission.WRITE_CALENDAR permission: granted
org.dmfs.permission.READ_TASKS permission: granted
org.dmfs.permission.WRITE_TASKS permission: granted
System-wide synchronization: automatically

I'm using my own server with a mysql db.

I have many thousand entries in my calendar. I already exported and reimported it, because of an earlier error (I think it was HMAC mismatch).

I also pretty often have duplicate calendar entries, especially with repeating appointments. Not sure if this is related.

Craeckie avatar Apr 04 '20 20:04 Craeckie

Have you tried restarting the phone for the locked database issues? I've seen them happen before (a long while ago), but not any time in recent memory...

Duplicate calendar entries: what other clients are you using? Do the events also appear duplicated in the change log? What could be the case is that you are using some other client that is doing something weird with recurring events which confuses etesync.

tasn avatar Apr 05 '20 06:04 tasn

Hi, sorry for the long delay, semester started and it's a mess with all the online courses.

Have you tried restarting the phone for the locked database issues? I've seen them happen before (a long while ago), but not any time in recent memory...

Just restarted it and changed a few entries and it hasn't crashed since. I fear it might continue to crash after it ran for some time..

Duplicate calendar entries: what other clients are you using? Do the events also appear duplicated in the change log? What could be the case is that you are using some other client that is doing something weird with recurring events which confuses etesync.

I use Simple Calendar and ToDo Agenda. Also ICSx5 has access. Now I disabled access to the calendar for all other apps, will see if that helps.

Maybe some more information could help:

  • Currently I have 9711 journal entries in one calendar
  • Even after synchronizing the number of events shown in EteSync is different on my phone and tablet. On the phone it's 9582, on the tablet 9624.
  • The journal seems to be the same on tablet and phone

Craeckie avatar May 01 '20 10:05 Craeckie