Setting an image render timeout causes timeout

I have identified an issue that could be tripping up others, so thought I’d share just in case.

I am trying to automate the process of downloading a PNG of a panel. To do this, I have tried to run the following.

curl "" > image.png

This has worked as expected in the past, but on Grafana v7.0.1 it failed and generated the following logs.

t=2020-06-17T13:20:58+0000 lvl=info msg=Rendering logger=rendering renderer=plugin path="d-solo/bhoLRgmGz/main?panelId=4&width=1000&height=500&timeout=9999999"
t=2020-06-17T13:21:00+0000 lvl=eror msg="Render request failed" logger=plugins.backend pluginId=grafana-image-renderer url="http://localhost:80/d-solo/bhoLRgmGz/main?panelId=4&width=1000&height=500&timeout=9999999&render=1" error="Timeo$
t=2020-06-17T13:21:00+0000 lvl=eror msg="Rendering failed." logger=context userId=1 orgId=1 uname=admin error="Rendering failed: TimeoutError: waiting for function failed: timeout 9999999000ms exceeded"
t=2020-06-17T13:21:00+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/render/d-solo/bhoLRgmGz/main status=500 time_ms=2302 size=1723 referer=

I then removed the timeout deceleration entirely, and it ran as expected. Weird that setting a two hour timeout makes it time out in 2 seconds, but not setting a timeout whatsoever lets it run. I notice that an additional “000” was added on the end of the timeout variable, so is it only looking at that and interpreting it to mean timeout at 0ms? Not sure. It seems to work without it though.

Hope this helps someone.


Please upgrade to Grafana 7.0.3 and try that again. If the issue persists, please file a bug report. Thank you!

hello, Im sorry but how did you fix that? Im using Grafana v7.5.7 and facing the same issue…

1 Like