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

Dashboard pages try to load all activity #2177

Closed
beasteers opened this issue Jul 11, 2018 · 3 comments
Closed

Dashboard pages try to load all activity #2177

beasteers opened this issue Jul 11, 2018 · 3 comments

Comments

@beasteers
Copy link

When you go to a dashboard edit page, e.g. /tables/[table]/1, it tries to load all of the revisions into the right sidebar. But when I was dealing with #2176, our directus_activity table got to ~7 million records, so the pages just wouldn't load and they would hang on the Loading Data message. It wasn't until I dumped the directus_activity rows that I was able to use those pages again. I'd recommend limiting that query to something like ~100 revisions, just so that even if the directus_activity does explode, the app is still usable.

@beasteers
Copy link
Author

Just from a quick look:

// directus/api/core/Directus/Database/TableGateway/DirectusActivityTableGateway.php, line 101
...
    public function fetchRevisions($row_id, $table_name, $limit = 100) {
        $columns = ['id', 'action', 'user', 'datetime'];

        $sql = new Sql($this->adapter);
        $select = $sql->select()
            ->from($this->table)
            ->columns($columns)
            ->order('id DESC');
            ->limit($limit); // add this
...

Not sure how you would want to handle the value of limit.

@benhaynes benhaynes added the v6 label Oct 12, 2018
@benhaynes
Copy link
Sponsor Member

Kamino cloned this issue to directus/api

@benhaynes
Copy link
Sponsor Member

Kamino closed and cloned this issue to directus/directus-6-legacy

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants