Skip to content

Commit 1938226

Browse files
authored
Merge pull request #261 from carlosms/idle-db-timeout
[HOTFIX] Set DB conn reuse timeout
2 parents 687e5df + 196338d commit 1938226

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd/gitbase-web/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ func (c *ServeCommand) Execute(args []string) error {
5151
}
5252
defer db.Close()
5353

54+
db.SetMaxIdleConns(0)
55+
5456
static := handler.NewStatic("build/public", c.ServerURL, c.SelectLimit, c.FooterHTML)
5557

5658
// start the router

0 commit comments

Comments
 (0)