Skip to content

Commit c459e5c

Browse files
jeffhuang4704ChihJen Huang
authored andcommitted
NVSHAS-9925_Fix image asset API error
1 parent 0155dd7 commit c459e5c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

db/models.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ func CreateVulAssetDb(useLocal bool) error {
226226
}
227227
memoryDbHandle = db
228228

229+
// Refer to the official documentation for guidance on avoiding this issue:
230+
// Error: database is locked
231+
// https://github.com/mattn/go-sqlite3
232+
memoryDbHandle.SetMaxOpenConns(1)
233+
229234
statements := make([]string, 0)
230235

231236
// create vulasset table

0 commit comments

Comments
 (0)