mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
[Fixed] Profiling and Monitoring timeout issues
The http servers for those two were recently modified to set a ReadTimeout and WriteTimeout. The WriteTimeout specifically caused issues for Profiling since it is common to ask sampling of several seconds. Pprof code would reject the request if it detected that http server's WriteTimeout was more than sampling in request. For monitoring, any situation that would cause the monitoring code to take more than 2 seconds to gather information (could be due to locking, amount of objects to return, time required for sorting, etc..) would also cause cURL to return empty response or WebBrowser to fail to display the page. Resolves #600
This commit is contained in:
@@ -71,7 +71,7 @@ func runMonitorServerNoHTTPPort() *server.Server {
|
||||
}
|
||||
|
||||
func resetPreviousHTTPConnections() {
|
||||
http.DefaultTransport = &http.Transport{}
|
||||
http.DefaultTransport.(*http.Transport).CloseIdleConnections()
|
||||
}
|
||||
|
||||
// Make sure that we do not run the http server for monitoring unless asked.
|
||||
|
||||
Reference in New Issue
Block a user