Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

"http: superfluous response.WriteHeader call" error when adding a dozen torrents #11

Open
barnumbirr opened this issue Nov 14, 2020 · 1 comment

Comments

@barnumbirr
Copy link

barnumbirr commented Nov 14, 2020

Hello,

rtorrent_exporter seems to have trouble when adding more than a couple of torrents at the same time These are the logs produced when adding 13 torrents:

Nov 14 16:59:55 helios64 rtorrent_exporter[1252]: 2020/11/14 08:59:55 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:58)
Nov 14 16:59:57 helios64 rtorrent_exporter[1252]: 2020/11/14 08:59:57 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:58)
Nov 14 16:59:59 helios64 rtorrent_exporter[1252]: 2020/11/14 08:59:59 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:58)
Nov 14 17:00:01 helios64 rtorrent_exporter[1252]: 2020/11/14 09:00:01 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:58)
Nov 14 17:00:04 helios64 rtorrent_exporter[1252]: 2020/11/14 09:00:04 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:58)
Nov 14 17:00:06 helios64 rtorrent_exporter[1252]: 2020/11/14 09:00:06 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:58)

Is there anything I can do to help debug this further?

Cheers.

EDIT: also happens when adding 3 torrents:

Nov 16 13:55:51 helios64 rtorrent_exporter[3650]: 2020/11/16 13:55:51 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:58)
Nov 16 13:59:16 helios64 rtorrent_exporter[3650]: 2020/11/16 13:59:16 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:58)
Nov 16 14:02:32 helios64 rtorrent_exporter[3650]: 2020/11/16 14:02:31 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:58)
@barnumbirr
Copy link
Author

barnumbirr commented Nov 16, 2020

After some investigating, it seems upgrading prometheus/client_golang to version 1.5.1 or later is supposed to fix the issue. (sources: #1, #2).
That does indeed seem to "fix" the issue as the error logs don't show up anymore. There is however still an underlying issue as the metrics are not exported.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant