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

Failed to load graph data: Timed out after 45 seconds. (../v1/graph?type=activity&server=...) #1329

Open
FrozenBeard opened this issue Feb 11, 2020 · 4 comments

Comments

@FrozenBeard
Copy link

@FrozenBeard FrozenBeard commented Feb 11, 2020

Using 5.0 build 382

Screenshot 2020-02-11 at 14 19 52

@Rsl1122

This comment has been minimized.

Copy link
Collaborator

@Rsl1122 Rsl1122 commented Feb 11, 2020

Hmm, the query is probably taking a long time.

You can use Html Customization for a temporary "fix" for the timeout by changing this line in /web/js/xmlhttprequests.js

@Rsl1122 Rsl1122 changed the title Failed to load graph data: Timed out after 45 seconds. (../v1/graph?type=activity&server=d2c542ae-18dd-354b-aff7-515a9b0e8764) Failed to load graph data: Timed out after 45 seconds. (../v1/graph?type=activity&server=...) Feb 11, 2020
@FrozenBeard

This comment has been minimized.

Copy link
Author

@FrozenBeard FrozenBeard commented Feb 11, 2020

I've got a lot of data... Can you link me to the SQL query for it? Might be pulling too much

@Rsl1122

This comment has been minimized.

Copy link
Collaborator

@Rsl1122 Rsl1122 commented Feb 11, 2020

This called x8 (for 8 weeks)

It says a lot that the query has 81 parameters..

Basically this:

                - Select active_playtime for each player in 3 different weeks [selectActivityIndexSQL()]
            - Select activity index (calculated in sql) for each player  [selectActivityIndexSQL()]
        - Select activity_index, uuid, activity group (based on activity index limit) [selectIndexes]
    - Group by activity group & count players in the group [selectCount]
- union this 5 times for each activity group [selectMultipleCounts]

So 5 nested queries with some joins in-between.

I already got some ideas for some optimizations looking at it.

@FrozenBeard

This comment has been minimized.

Copy link
Author

@FrozenBeard FrozenBeard commented Feb 12, 2020

Holy SQL, Yeah i'm not going to be any help haha

LIMIT? haha

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.