-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
sometimes format=json requests return png's #576
Comments
Adding a "me too" to this, thought I was going quietly insane. I'm seeing this on 0.9.12. |
👍 ditto |
Is there any progress on this bug? For me this behavior doesn't seem to be arbitrary, it is happening for all the metrics, all the time. |
the other day i went over all commits from 0.9.10 to 0.9.12 but couldn't find what caused it. @abhinav-upadhyay is your graphite machine heavily loaded? (can you check iowait & cpu idle on your graphite machine). i wonder if the issues appears more often is a machine is heavily loaded. |
The cpu idle is between 60-80% and iowait is mostly 0-5%. |
@abhinav-upadhyay would you be able to provide a complete example of HTTP request that fails for you? Including headers, body (if any), params… everything. |
I experience the same, my box is also idle without any disk io or activity worth anything. It's running on RAID 10 SSD with 16G of memory and 8 core Xeon 5 In my experience this happens randomly, and a simple refresh of the same request (with same headers etc) yield the correct result The png response always says 'no data' while the json response have plenty of data - so wonder if it's a read / exception issue somewhere They error usually happens at once in grafana, it's very rarely just one request that fails, but all of them at the same time. Could it be something with request/response workers or uwsgi throttle timeout that causes some default response to be sent to the client? |
Hah, it happened to me as well. I tried replacing the gunicorn process with a straight |
I actually use uwsgi on the graphite server
|
Correction, it seems to be a caching issue. I managed to reproduce the issue reliably :) A workaround for now is to disable caching completely (django uses local memory by default). Add to CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
},
} The issue most likely lies in the way graph cache keys are derived from incoming requests. I'll work on a fix for this but not until next week though. |
I run it in apache, I enabled your CACHES setting in /webapp/graphite/local_settings.py, now let's see whether I don't see the bug for a few days. |
I'm also running graphite on Apache and the addition to |
I found something. Change |
Having the same issue |
…rameters for the requested method, and doesn't assume GET requests.
I'm an employee of Hosted Graphite. Some of our customers were affected by this issue, so we spent some time fixing it. We now have this fix in production for our customers. Additionally we have a pull request open with our fix. @brutasse was correct, the hashRequest function was always choosing to hash the GET parameters, which means that requests of other method types would hash to the same cache key. |
For those that are interested here's some code to reproduce this reliably: https://gist.github.com/rmca/5fc7feb596d7b4e579ff |
…rameters for the requested method, and doesn't assume GET requests.
Fix graphite-project#576 -- Request hash needs to include POST variables
Fix graphite-project#576 -- Request hash needs to include POST variables (0.9.x)
We can close this one soon, then I take it. |
Thanks for everyone who worked on this one! |
sometimes a
/render
request withformat=json
returns png data.it seems to happen arbitrarily, sometimes it retuns the json data just fine, sometimes not. and it happens for different metrics.
screenshots of the request:
http://i.imgur.com/od7bL1I.png
screenshot of the response:
http://i.imgur.com/JXte4kb.png
note that all params are submitted via post instead of get, which is a little atypical, but I believe should not matter since graphite-web just gets the params irrespective of get/post. (https://github.com/graphite-project/graphite-web/blob/master/webapp/graphite/render/views.py#L220)
The text was updated successfully, but these errors were encountered: