Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: WriteHeader called after Handler finished #13

Open
kwzcoder opened this issue Mar 11, 2020 · 0 comments
Open

panic: WriteHeader called after Handler finished #13

kwzcoder opened this issue Mar 11, 2020 · 0 comments

Comments

@kwzcoder
Copy link

kwzcoder commented Mar 11, 2020

部署在云服务器上会panic: WriteHeader called after Handler finished

micro Api panic 必现步骤 :
1. 先把熔断阀值调高
hystrix.DefaultMaxConcurrent = 100000
hystrix.DefaultVolumeThreshold = 100000
2. 熔断超时调低
hystrix.DefaultTimeout = 100
3 .用压测工具 webbench 高并发请求接口必panic "panic: net/http: CloseNotify called after ServeHTTP finished"
在这之前想请教下 Demo里面 user-api里超时设置 hystrix.DefaultTimeout = 5000 , 但是我在breaker/hystrix.go打印依然是默认的1000, 在api/user/main.go设置是不是没有生效? 所以上述的步骤里面几句代码是加在了, breaker/hystrix.go init()函数里面
image

image

image

@kwzcoder kwzcoder reopened this May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant