We're here to help!

ERROR_CODE:5 Error executing sqlite statement:database is locked

Follow

Intermittently dbvctl log transfer fails with ERROR_CODE:5 Error executing SQLite statement: database is locked


Problem Details

Problem Statement

Intermittently dbvctl log transfer fails with ERROR_CODE:5 Error executing SQLite statement: database is locked

Applicable Error Code

 ERROR_CODE:5 Error executing sqlite statement:database is locked 

Affected Versions

v8 and v9

Affected Platforms

All

 

Description

This error occurs when you have multiple DDC configuration setup on the server and that use the same repository for storing data Ex: /usr/dbvisit/standby/conf/DEV.db. Sometimes processes of both configurations try to access/modify the repository at once and fail with SQLite database lock. We could resolve this issue by increasing the timeout value of internal parameter SQLITE_BUSY_TIMEOUT.

Default value 

 SQLITE_BUSY_TIMEOUT=5000
Solution

Step1. Edit Dbvisit configuration file on your primary server and add this parameter

SQLITE_BUSY_TIMEOUT=20000

Step2: Run the command from primary to copy the updated DDC to standby

./dbvctl -d <DDC> -c

Step3: Restart the daemon process from both primary and standby for changes to take into effect

./dbvctl -d DEV -D stop
./dbvctl -d DEV -D start
 
 
 
 
 
Have more questions? Submit a request

Comments