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

[Bug]Turning on gzip compression breaks avatar transmission #5952

Closed
chaosben opened this Issue Sep 2, 2016 · 5 comments

Comments

Projects
None yet
6 participants
@chaosben
Copy link

chaosben commented Sep 2, 2016

If gzip is enabled, something goes wrong within the avatar transmission.

The browser complains
Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH http://127.0.0.1:3000/avatar/ce02af25e212884d65c34cab5e191ff3

If Grafana is used through mod_proxy the apache log says
(70008)Partial results are valid but processing is incomplete: [client ...] AH01110: error reading response

If gzip is disabled, everything works as expected.

Grafana 3.1.1
OS Fedora 4.5.6-200.fc23.x86_64

@torkelo torkelo added the type/bug label Sep 5, 2016

@DanCech

This comment has been minimized.

Copy link
Member

DanCech commented Mar 28, 2017

enabling gzip also causes problems with plugin readme display, which shows the result of running the raw gzipped data through markdown

@Tom-Fawcett

This comment has been minimized.

Copy link

Tom-Fawcett commented Oct 3, 2017

Enabling gzip also breaks the /metrics endpoint.

Both when behind a nginx reverse proxy, and when going direct to grafana.

Visiting the endpoint in Chrome returns ERR_CONTENT_LENGTH_MISMATCH

When using nginx I see:

2017/10/03 08:32:30 [error] 1630#1630: *10178 upstream prematurely closed connection while reading upstream, client: XXX.XX.X.XX, server: XXXXXXXXXXXXX, request: "GET /metrics HTTP/1.1", upstream: "http://127.0.0.1:3000/metrics", host: "XXXXXXXXX"

And prometheus, when trying to scrape /metrics, shows unexpected EOF.

Version 4.5.2 (commit: ec2b0fe)

daniellee added a commit that referenced this issue Oct 9, 2017

gzip: plugin readme content set explicitly
Macaron's gzip middleware tries to automatically figure out the content
type for a file when gzipped and seems to mostly fail with plugin
readmes. This change sets the content type to plain text.

Fixes #9344. Ref #5952.
@bergquist

This comment has been minimized.

Copy link
Contributor

bergquist commented Oct 9, 2017

Created new issue for solving the bug regarding broken /metrics endpoint when gzip is enabled. #9464

@bergquist bergquist removed their assignment Oct 9, 2017

@daniellee

This comment has been minimized.

Copy link
Member

daniellee commented Oct 9, 2017

Partial fix - fixed the plugin readme getting the wrong content type when gzipping. Could not recreate the avatar bug.

@torkelo

This comment has been minimized.

Copy link
Member

torkelo commented Oct 9, 2017

the avatar bug might have been fixed in recent commit (when I merged annotations, as I in that commit brought over my changes from develop branch of the gravatar proxy)

bergquist added a commit that referenced this issue Oct 9, 2017

metrics: disable gzip for /metrics endpoint
Prometheus client lib support gzip by itself. we should
leave it up to the client/promhttp to decide if gzip
should be used.

closes ##5952

@torkelo torkelo added this to the 4.6.2 milestone Nov 17, 2017

@torkelo torkelo closed this in 303e3de Nov 17, 2017

@torkelo torkelo modified the milestones: 4.6.2, 4.7.0, 4.6.3 Nov 17, 2017

torkelo added a commit that referenced this issue Nov 17, 2017

johnmetta added a commit to mettadore/grafanyx that referenced this issue Apr 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.