Skip to content

Commit a6ad252

Browse files
authored
Merge pull request #3498 from gravitl/fix/db-conn-pool
Fix: Skip setting open connections;
2 parents deb3be3 + 67baa75 commit a6ad252

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

database/postgres.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import (
55
"database/sql"
66
"errors"
77
"github.com/gravitl/netmaker/db"
8-
"time"
9-
108
_ "github.com/lib/pq"
119
)
1210

@@ -35,9 +33,6 @@ func initPGDB() error {
3533
return dbOpenErr
3634
}
3735

38-
PGDB.SetMaxOpenConns(5)
39-
PGDB.SetConnMaxLifetime(time.Hour)
40-
4136
return PGDB.Ping()
4237
}
4338

database/sqlite.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import (
55
"database/sql"
66
"errors"
77
"github.com/gravitl/netmaker/db"
8-
"time"
9-
108
_ "github.com/mattn/go-sqlite3" // need to blank import this package
119
)
1210

@@ -35,9 +33,6 @@ func initSqliteDB() error {
3533
return dbOpenErr
3634
}
3735

38-
SqliteDB.SetMaxOpenConns(5)
39-
SqliteDB.SetConnMaxLifetime(time.Hour)
40-
4136
return nil
4237
}
4338

0 commit comments

Comments
 (0)