mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
session: fork Macaron mysql session middleware
This changes forks the mysql part of the Macaron session middleware. In the forked mysql file: - takes in a config setting for SetConnMaxLifetime (this solves wait_timeout problem if it is set to a shorter interval than wait_timeout) - removes the panic when an error is returned in the Exist function. - retries the exist query once - retries the GC query once
This commit is contained in:
@@ -131,7 +131,8 @@ var (
|
||||
PluginAppsSkipVerifyTLS bool
|
||||
|
||||
// Session settings.
|
||||
SessionOptions session.Options
|
||||
SessionOptions session.Options
|
||||
SessionConnMaxLifetime int64
|
||||
|
||||
// Global setting objects.
|
||||
Cfg *ini.File
|
||||
@@ -634,6 +635,8 @@ func readSessionConfig() {
|
||||
if SessionOptions.CookiePath == "" {
|
||||
SessionOptions.CookiePath = "/"
|
||||
}
|
||||
|
||||
SessionConnMaxLifetime = Cfg.Section("session").Key("conn_max_lifetime").MustInt64(0)
|
||||
}
|
||||
|
||||
func initLogging() {
|
||||
|
||||
Reference in New Issue
Block a user