{"action":"opened","issue":{"url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/357","labels_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/357/labels{/name}","comments_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/357/comments","events_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/357/events","html_url":"https://github.com/Raizlabs/DBFlow/issues/357","id":100510015,"number":357,"title":"Concurrency error while accessing to db","user":{"login":"arturonaredo","id":714159,"avatar_url":"https://avatars.githubusercontent.com/u/714159?v=3","gravatar_id":"","url":"https://api.github.com/users/arturonaredo","html_url":"https://github.com/arturonaredo","followers_url":"https://api.github.com/users/arturonaredo/followers","following_url":"https://api.github.com/users/arturonaredo/following{/other_user}","gists_url":"https://api.github.com/users/arturonaredo/gists{/gist_id}","starred_url":"https://api.github.com/users/arturonaredo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arturonaredo/subscriptions","organizations_url":"https://api.github.com/users/arturonaredo/orgs","repos_url":"https://api.github.com/users/arturonaredo/repos","events_url":"https://api.github.com/users/arturonaredo/events{/privacy}","received_events_url":"https://api.github.com/users/arturonaredo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-12T10:06:13Z","updated_at":"2015-08-12T10:06:13Z","closed_at":null,"body":"Hi, \r\n\r\nan exception was raised to me while I was trying to access to the database trhough multiple threads, It's almost imposible to reproduce bug I have the trace if you need it or if is useful to you somehow. \r\n\r\njava.lang.RuntimeException: android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5): retrycount exceeded\r\n       at com.raizlabs.android.dbflow.runtime.DBTransactionQueue.run(DBTransactionQueue.java:75)\r\nCaused by: android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5): retrycount exceeded\r\n       at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(SQLiteConnection.java)\r\n       at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:845)\r\n       at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836)\r\n       at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)\r\n       at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:144)\r\n       at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:133)\r\n       at com.raizlabs.android.dbflow.sql.SqlUtils.hasData(SqlUtils.java:209)\r\n       at com.raizlabs.android.dbflow.sql.language.Where.hasData(Where.java:379)\r\n       at com.glownet.next.entities.CurrentEvent$Adapter.exists(CurrentEvent$Adapter.java:109)\r\n       at com.glownet.next.entities.CurrentEvent$Adapter.exists(CurrentEvent$Adapter.java:12)\r\n       at com.raizlabs.android.dbflow.sql.SqlUtils.save(SqlUtils.java:227)\r\n       at com.raizlabs.android.dbflow.structure.ModelAdapter.save(ModelAdapter.java:54)\r\n       at com.raizlabs.android.dbflow.structure.BaseModel.save(BaseModel.java:54)\r\n       at com.raizlabs.android.dbflow.runtime.transaction.process.SaveModelTransaction.processModel(SaveModelTransaction.java:33)\r\n       at com.raizlabs.android.dbflow.runtime.transaction.process.ProcessModelHelper$1.run(ProcessModelHelper.java:33)\r\n       at com.raizlabs.android.dbflow.runtime.TransactionManager.transact(TransactionManager.java:108)\r\n       at com.raizlabs.android.dbflow.runtime.transaction.process.ProcessModelHelper.process(ProcessModelHelper.java:28)\r\n       at com.raizlabs.android.dbflow.runtime.transaction.process.ProcessModelInfo.processModels(ProcessModelInfo.java:159)\r\n       at com.raizlabs.android.dbflow.runtime.transaction.process.ProcessModelTransaction.onExecute(ProcessModelTransaction.java:43)\r\n       at com.raizlabs.android.dbflow.runtime.transaction.process.ProcessModelTransaction.onExecute(ProcessModelTransaction.java:13)\r\n       at com.raizlabs.android.dbflow.runtime.DBTransactionQueue.run(DBTransactionQueue.java:61)"}}