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

http: superfluous response.WriteHeader #2537

Closed
katarzyna-z opened this issue May 8, 2020 · 4 comments · Fixed by #2605
Closed

http: superfluous response.WriteHeader #2537

katarzyna-z opened this issue May 8, 2020 · 4 comments · Fixed by #2605

Comments

@katarzyna-z
Copy link
Collaborator

katarzyna-z commented May 8, 2020

Sometimes /metrics endpoint does not respond and in logs there is following information:

2020/05/08 09:09:20 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.httpError (http.go:344)
2020/05/08 09:10:39 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.httpError (http.go:344)
2020/05/08 09:10:46 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.httpError (http.go:344)
2020/05/08 09:11:26 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.httpError (http.go:344)
2020/05/08 09:11:32 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.httpError (http.go:344

There is an issue in client-golang which could be related: prometheus/client_golang#672

@nightah
Copy link
Contributor

nightah commented May 9, 2020

Also seeing similar issues with my instance of cadvisor:

2020/05/08 15:58:35 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.httpError (http.go:306)
2020/05/08 15:58:40 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.httpError (http.go:306)
2020/05/08 15:58:45 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.httpError (http.go:306)
2020/05/08 15:58:50 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.httpError (http.go:306)
2020/05/08 15:58:55 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.httpError (http.go:306)
2020/05/08 15:59:00 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.httpError (http.go:306)

A restart seems to restore the service, however, this intermittently will pop up again.

@katarzyna-z
Copy link
Collaborator Author

katarzyna-z commented May 11, 2020

A restart seems to restore the service, however, this intermittently will pop up again.

I have the same observations.

@romulolibralon
Copy link

In my case this is happening because a have a lot of information from my metrics. Im also trying to find the solution.

@nightah
Copy link
Contributor

nightah commented Jun 28, 2020

@dashpole https://github.com/prometheus/client_golang/releases/tag/v1.5.1 seems to suggest that the bug was fixed upstream.

Just looking at node_exporter to see if there's any correlation in client_golang and while I know I have not experienced this issue in node_exporter they are running: github.com/prometheus/client_golang v1.6.0.

I'll perform some testing locally first to see if this does indeed resolve the issue. Assuming it does I'll submit a PR accordingly.

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

Successfully merging a pull request may close this issue.

3 participants