question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rendering dashboards timeouts in kubernetes (but rendering panels works fine)

See original GitHub issue

What happened: I am trying to obtain image of whole dashboard using image renderer in grafana instance set up in kubernetes (deployed with helm chart).

Rendering both panels and dashboards works fine with provided docker compose on local machine. Rendering single panel works, but attempts to render whole dashboard(with single panel) fail with timeout.

Locally: works(panel) : https://my-url/grafana/render/d-solo/gvjU0GIMz/testdashboardforrenderer?orgId=1&from=1596772156586&to=1596793756586&panelId=2&width=1000&height=500&tz=Europe%2FWarsaw works(dashboard): https://my-url/grafana/render/d/gvjU0GIMz/testdashboardforrenderer?orgId=1&from=1596772156586&to=1596793756586&panelId=2&width=1000&height=500&tz=Europe%2FWarsaw

On kubernetes: -works(panel): https://my-url/grafana/render/d-solo/gvjU0GIMz/testdashboardforrenderer?orgId=1&from=1596772156586&to=1596793756586&panelId=2&width=1000&height=500&tz=Europe%2FWarsaw -fails(dashboard): https://my-url/grafana/render/d/gvjU0GIMz/testdashboardforrenderer?orgId=1&from=1596772156586&to=1596793756586&panelId=2&width=1000&height=500&tz=Europe%2FWarsaw

Failure logs:

{"timeout":"60s","level":"debug","message":"Waiting for dashboard/panel to load"}

{"url":"/render?deviceScaleFactor=1.000000&domain=localhost&encoding=&height=500&renderKey=CgaBORr9GuDfERxlEDRE0CBgBkGCzWkT&timeout=60&timezone=Europe%2FWarsaw&url=http%3A%2F%2Flocalhost%3A3000%2Fd%2FgvjU0GIMz%2Ftestdashboardforrenderer%3ForgId%3D1%26from%3D1596772156586%26to%3D1596793756586%26panelId%3D2%26width%3D1000%26height%3D500%26tz%3DEurope%252FWarsaw%26render%3D1&width=1000","stack":"TimeoutError: waiting for function failed: timeout 60000ms exceeded\n    at new WaitTask (/usr/src/app/node_modules/puppeteer/lib/DOMWorld.js:549:28)\n    at DOMWorld.waitForFunction (/usr/src/app/node_modules/puppeteer/lib/DOMWorld.js:454:12)\n    at Frame.waitForFunction (/usr/src/app/node_modules/puppeteer/lib/FrameManager.js:657:28)\n    at Page.waitForFunction (/usr/src/app/node_modules/puppeteer/lib/Page.js:1144:29)\n    at Browser.<anonymous> (/usr/src/app/build/browser/browser.js:174:24)\n    at Generator.next (<anonymous>)\n    at fulfilled (/usr/src/app/build/browser/browser.js:5:58)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)","level":"error","message":"Request failed"}

{"url":"http://localhost:3000/d/gvjU0GIMz/testdashboardforrenderer?orgId=1&from=1596772156586&to=1596793756586&panelId=2&width=1000&height=500&tz=Europe%2FWarsaw&render=1","level":"debug","message":"Connection closed"}

{"message":"127.0.0.1 - - [07/Aug/2020:09:52:28 +0000] \"GET /render?deviceScaleFactor=1.000000&domain=localhost&encoding=&height=500&renderKey=JTXWVv7qlBQ530L7PAevNgNDDjf1s0AE&timeout=60&timezone=Europe%2FWarsaw&url=http%3A%2F%2Flocalhost%3A3000%2Fd%2FgvjU0GIMz%2Ftestdashboardforrenderer%3ForgId%3D1%26from%3D1596772156586%26to%3D1596793756586%26panelId%3D2%26width%3D1000%26height%3D500%26tz%3DEurope%252FWarsaw%26render%3D1&width=1000 HTTP/1.1\" - - \"-\" \"Grafana/7.1.3\"\n","level":"debug"}

{"url":"/render?deviceScaleFactor=1.000000&domain=localhost&encoding=&height=500&renderKey=JTXWVv7qlBQ530L7PAevNgNDDjf1s0AE&timeout=60&timezone=Europe%2FWarsaw&url=http%3A%2F%2Flocalhost%3A3000%2Fd%2FgvjU0GIMz%2Ftestdashboardforrenderer%3ForgId%3D1%26from%3D1596772156586%26to%3D1596793756586%26panelId%3D2%26width%3D1000%26height%3D500%26tz%3DEurope%252FWarsaw%26render%3D1&width=1000","stack":"TimeoutError: waiting for function failed: timeout 60000ms exceeded\n    at new WaitTask (/usr/src/app/node_modules/puppeteer/lib/DOMWorld.js:549:28)\n    at DOMWorld.waitForFunction (/usr/src/app/node_modules/puppeteer/lib/DOMWorld.js:454:12)\n    at Frame.waitForFunction (/usr/src/app/node_modules/puppeteer/lib/FrameManager.js:657:28)\n    at Page.waitForFunction (/usr/src/app/node_modules/puppeteer/lib/Page.js:1144:29)\n    at Browser.<anonymous> (/usr/src/app/build/browser/browser.js:174:24)\n    at Generator.next (<anonymous>)\n    at fulfilled (/usr/src/app/build/browser/browser.js:5:58)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)","level":"error","message":"Request failed"}

Result are the same in both configurations:

What you expected to happen: Dashboard image can be rendered in kubernetes

How to reproduce it (as minimally and precisely as possible):

  1. Run grafana using helm chart:https://github.com/helm/charts/tree/master/stable/grafana and values:
image:
  tag: latest

extraContainers: |
  - name: image-render
    image: grafana/grafana-image-renderer:latest
    ports:
      - containerPort: 8081
    env:
      - name: LOG_LEVEL
        value: debug
      - name: HTTP_HOST
        value: localhost
      - name: RENDERING_VERBOSE_LOGGING
        value: "true"

envRenderSecret:
  GF_RENDERING_SERVER_URL: http://localhost:8081/render
  GF_RENDERING_CALLBACK_URL: http://localhost:3000
  GF_LOG_FILTERS: rendering:debug
  1. Create dashboard with example chart, save it.
  2. Render panel’s image (panel -> share -> image), it should work.
  3. Change render/d-solo do render/d to render whole panel’s image - it fails.

Anything else we need to know?:

Environment:

  • Grafana Image Renderer version: 2.0.0
  • Grafana version: 7.1.3
  • Installed plugin or remote renderer service: remote render service (separate container in docker, behaviour is identical with custom grafana image with renderer plugin included)
  • OS Grafana Image Renderer is installed on: Kubernetes
  • User OS & Browser: Ubuntu grafana-image-renderer, Firefox 79.0
  • Others:

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

2reactions
keithhardawaycommented, Sep 22, 2020

I’m trying to run the image renderer in a similar way, as a sidecar to the main Grafana kubernetes container, and getting the same timeout error.

{"url":"/render?deviceScaleFactor=1.000000&domain=localhost&encoding=&height=500&renderKey=Vfuz3q6oFS3jkkZvTSfhs1LT3z7kTRl8&timeout=60&timezone=America%2FLos_Angeles&url=http%3A%2F%2Flocalhost%3A3000%2Fdashboard-solo%2Fnew%3ForgId%3D1%26from%3D1600785871283%26to%3D1600807471283%26panelId%3D2%26width%3D1000%26height%3D500%26tz%3DAmerica%252FLos_Angeles%26render%3D1&width=1000","stack":"TimeoutError: waiting for function failed: timeout 60000ms exceeded\n at new WaitTask (/usr/src/app/node_modules/puppeteer/lib/DOMWorld.js:549:28)\n at DOMWorld.waitForFunction (/usr/src/app/node_modules/puppeteer/lib/DOMWorld.js:454:12)\n at Frame.waitForFunction (/usr/src/app/node_modules/puppeteer/lib/FrameManager.js:657:28)\n at Page.waitForFunction (/usr/src/app/node_modules/puppeteer/lib/Page.js:1144:29)\n at Browser.<anonymous> (/usr/src/app/build/browser/browser.js:174:24)\n at Generator.next (<anonymous>)\n at fulfilled (/usr/src/app/build/browser/browser.js:5:58)\n at processTicksAndRejections (internal/process/task_queues.js:97:5)","level":"error","message":"Request failed"}

1reaction
vikrant6commented, Jul 28, 2021

Facing the exact same issue. Grafana version 7.4.0, grafana/grafana-image-renderer:2.1.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set up image rendering | Grafana documentation
Set up image rendering. Grafana supports automatic rendering of panels as PNG images. This allows Grafana to automatically generate images of your panels...
Read more >
grafana image renderer on docker: bad request - Stack Overflow
I have a docker stack with Grafana and it's image renderer plugin configured ... but when trying to render a panel I get...
Read more >
Creating Monitoring Dashboards. Guidelines for developers
Failed requests are not representative examples of latency as they could fail fast (e.g. 500) or take a lot of time to complete...
Read more >
Deploy and Access the Kubernetes Dashboard
Deploy the web UI (Kubernetes Dashboard) and access it. Dashboard is a web-based Kubernetes user interface. You can use Dashboard to deploy ...
Read more >
Panel types for dashboards (DEPRECATED) - GitLab Docs
To fix this problem, limit the amount of data returned by changing the time range filter on the metrics dashboard UI, or adding...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found