Skip to content

Commit

Permalink
fix sqlite db lock by reducing maximum open connections to 1 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
tigerinus authored Dec 2, 2022
1 parent aa13f0c commit 95519a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion repository/repository_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func NewDatabaseRepository(databaseFilePath string) (Repository, error) {

c, _ := db.DB()
c.SetMaxIdleConns(10)
c.SetMaxOpenConns(100)
c.SetMaxOpenConns(1)
c.SetConnMaxIdleTime(1000 * time.Second)

if err := db.AutoMigrate(&model.EventType{}, &model.ActionType{}, &model.PropertyType{}); err != nil {
Expand Down

0 comments on commit 95519a9

Please sign in to comment.