diff --git a/rdbms/SqliteConn.cpp b/rdbms/SqliteConn.cpp index 246f13066de1750b9682cbeaf498aade25f2dfdb..0375bd55cf7b2712a9d8ad8c2b90feff3d6f122b 100644 --- a/rdbms/SqliteConn.cpp +++ b/rdbms/SqliteConn.cpp @@ -39,6 +39,10 @@ SqliteConn::SqliteConn(const std::string &filename): sqlite3_close(m_sqliteConn); throw exception::Exception(msg); } + + // Give SQLite upto 10 seconds to avoid a busy error + sqlite3_busy_timeout(m_sqliteConn, 10000); + { char *errMsg = nullptr; if(SQLITE_OK != sqlite3_exec(m_sqliteConn, "PRAGMA foreign_keys = ON;", nullptr, nullptr, &errMsg)) {