Most probably this error is due to multiple connection,and also it is a bad practice to use multiple connections when connecting to SQLite
SQLITE_BUSY means that another database connection (probably in another process) is using the database in a way that prevents you from using it. SQLITE_LOCKED means the source of contention is internal and comes from the same database connection that received the SQLITE_LOCKED error.