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

thingsboard REST API taking too much time to get history data #10800

Closed
swapon-think opened this issue May 16, 2024 · 2 comments
Closed

thingsboard REST API taking too much time to get history data #10800

swapon-think opened this issue May 16, 2024 · 2 comments
Assignees

Comments

@swapon-think
Copy link

swapon-think commented May 16, 2024

We're facing issue with data fething using REST API and as well as from dashboard. We are trying to get history data for device using different interval like 1 day, 7 day and 30 days. It's taking 10 or more seconds, even sometimes it takes 30 seconds or more and also failed to load many times.

I'm using thingsboard professional edition and our current thingsboard version is v.3.3.0

sample url: https://[domain name here]/api/plugins/telemetry/DEVICE/a05e8220-19b4-11ee-8f45-97d7eca13f17/values/timeseries?keys=1_unit,2_Unit,3_Unit&startTs=1714500000000&endTs=1715831823357&interval=86400000&orderBy=DESC&intervalType=MILLISECONDS&agg=MAX

We need all data in request and having issue to get the data using REST API. I would greatly appreciate any updates.

@mykhailokornieiev mykhailokornieiev self-assigned this May 22, 2024
@mykhailokornieiev
Copy link

Hi. As far as I know, I already answered you to this question on customer portal. I am duplicating the answer here without the sensitive information so that the community can refer to this ticket in case of similar problem
"You have at least 50k datapoints for each 1/2/3_unit key, as shown on widgets. Considering that 50k is the maximum allowable value for display, we can see that this is only in 3 days. That is, the final value can be dramatically larger.
Given that you are using an aggregation function, this may take some time to calculate. And even this does not guarantee that the database will handle this request.
It can be related to a lack of system resources or database design capabilities. In this case, I recommend recreating your aggregation logic; you can consider aggregating the data in the rule chain."
https://thingsboard.io/docs/paas/user-guide/rule-engine-2-0/analytics-nodes/
https://thingsboard.io/docs/user-guide/rule-engine-2-0/tutorials/aggregate-incoming-data-stream/

@mykhailokornieiev
Copy link

Closed this ticket due to inactivity.

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

No branches or pull requests

2 participants