Skip to content

Commit ac16f66

Browse files
committed
add max idle timeout to fix go-sql-driver/mysql#257
1 parent 61944c4 commit ac16f66

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docker/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ services:
1717
restart: always
1818
ports:
1919
- "8080:8080"
20-
image: shusson/variantstore:1.4
20+
image: shusson/variantstore:1.5
2121
entrypoint: 'go-wrapper run -d "${MYSQL_ROOT_USER}:${MYSQL_ROOT_PASSWORD}@tcp(db:${MYSQL_ROOT_PORT})/variants"'

variantstore.go

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ func main() {
9090
})
9191
check(err)
9292
fmt.Println("Connected to mysql server")
93+
db.SetConnMaxLifetime(10 * time.Second)
9394
if connectionCheck {
9495
return
9596
}

0 commit comments

Comments
 (0)