Merge pull request #13213 from reasonerjt/release-2.1.0-patch

add pprof for dumping the stack trace
This commit is contained in:
Daniel Jiang 2020-10-03 00:34:18 +08:00 committed by GitHub
commit 2cd20077a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,8 @@ package main
import (
"encoding/gob"
"fmt"
"net/http"
_ "net/http/pprof"
"net/url"
"os"
"os/signal"
@ -98,6 +100,9 @@ func gracefulShutdown(closing, done chan struct{}) {
}
func main() {
go func() {
fmt.Println(http.ListenAndServe("localhost:6060", nil))
}()
beego.BConfig.WebConfig.Session.SessionOn = true
beego.BConfig.WebConfig.Session.SessionName = config.SessionCookieName