Android: SQLCipher v3.5.9: Problem opening database when service is auto recreated

Hello People…!

I am performing database updation in Android background service after every 5 minutes in background.
When user swips out the task from recent app, leaving database open as task is still being performed,
service is abruptly closed and restarted (used START_STICKY flag to autorestart the service).
When app again tries to open database in background service it gives following error.:

    net.sqlcipher.database.SQLiteException: file is not a database: , while compiling: select count(*) from sqlite_master;
    at net.sqlcipher.database.SQLiteCompiledSql.native_compile(Native Method)
    at net.sqlcipher.database.SQLiteCompiledSql.compile(
    at net.sqlcipher.database.SQLiteCompiledSql.<init>(
    at net.sqlcipher.database.SQLiteProgram.<init>(
    at net.sqlcipher.database.SQLiteQuery.<init>(
    at net.sqlcipher.database.SQLiteDirectCursorDriver.query(
    at net.sqlcipher.database.SQLiteDatabase.rawQueryWithFactory(
    at net.sqlcipher.database.SQLiteDatabase.rawQuery(
    at net.sqlcipher.database.SQLiteDatabase.keyDatabase(
    at net.sqlcipher.database.SQLiteDatabase.openDatabaseInternal(
    at net.sqlcipher.database.SQLiteDatabase.openDatabase(
    at net.sqlcipher.database.SQLiteDatabase.openDatabase(
    at net.sqlcipher.database.SQLiteOpenHelper.getReadableDatabase(
    at net.sqlcipher.database.SQLiteOpenHelper.getReadableDatabase(
    at com.edelweiss.avcgeo.service.SyncIntentService.submitErrorRecord(
    at com.edelweiss.avcgeo.service.SyncIntentService.handleActionDataUpload(
    at com.edelweiss.avcgeo.service.SyncIntentService.onHandleIntent(
    at android.os.Handler.dispatchMessage(
    at android.os.Looper.loop(

I tried overriding onTaskRemoved() method in service to close database before task removal.
But it seems, service recreation takes place at the moment user ends the task whereas onTaskRemoved() is called when all tasks in older service(which is ended by user) are ended.

I am using synchronized singletone mechanism to get db reference to avoid problem due to multithreading, but as the new service will be running in the background eventhough older is not ended yet(android service behavior), multithreading problem remains in picture.
I can’t use foreground service to restrict it’s recreation as my app requirements says so.

I need better approach for handling things, please suggest.
Any help will be appreciated.