Backup fails on inSync Client with the error - OperationalError: database is locked
This article applies to:
- OS: Windows
- Product edition: inSync Cloud
Problem description
Backup on inSync Client fails with the following error:
OperationalError: database is locked.
Traceback
[2017-12-04 10:27:21,509]ERROR] Error <class 'pysqlite2._sqlite.OperationalError'>:database is locked. Traceback -Traceback (most recent call last):
File "inSyncLib\inSyncSyncer.pyc", line 4037, in dosync
File "inSyncLib\inSyncSyncer.pyc", line 4284, in syncfolders
File "inSyncLib\inSyncSyncer.pyc", line 1931, in sync
File "inSyncLib\inSyncSyncer.pyc", line 2229, in cleanup
File "inSyncLib\inSyncRHCache.pyc", line 103, in free_share
File "inSyncLib\inSyncRHCache.pyc", line 173, in __retry
File "inSyncLib\inSyncRHCache.pyc", line 134, in __db_free
OperationalError: database is locked
[2017-12-04 10:27:21,529] [WARNING] Backup failed. Error: database is locked.
Cause
Some of the causes of this error are as follows:
- Antivirus scanning enabled for Druva folders on the device.
- Low disk space on the system drive.
- Read and write getting impacted due to very high disk utilization on the device.
- Some other application has a handle on inSync Client.
- inSync Client database files have gone corrupt.
Resolution
You must investigate the possible cause to avoid recurrence due to same reason.
- Stop Druva services on the device and enable debug logging (create CDEBUG folder on root of C: drive)
- Start inSync services and run a manual backup.
- When the error reoccurs, check the file for which the error has occurred. The logs will be available at C:\ProgramData\Druva\inSync4\<username>\logs or C:\inSync4\users\<username>\logs. The file to check for is named as inSyncClient.XXXXXXXX-XXXXXX.log (where XX is the most recent timestamp).
- Open the process explorer and check if there is any handle on the file in question or in the inSync database.
- Kill the process explorer and start another manual backup after the process explorer has completely stopped.
- If you do not find a handle, restart the inSync Client and start a manual backup.
If the issue persists, contact Druva Support.