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

Fix: old task trackers were not really removed #1064

Merged
merged 1 commit into from May 19, 2016

Conversation

@arikfr
Copy link
Member

commented May 19, 2016

Due to stupid mistake, old task trackers are not removed from Redis which results in ever increasing memory usage.

This pull request fixes this, but if you want to cleanup your instance, you can use the following script:

from redash import redis_connection

if __name__ == '__main__':
    for k in redis_connection.keys('query_task_tracker:*'):
        if redis_connection.zscore('query_task_trackers:done', k) is None and redis_connection.zscore('query_task_trackers:waiting', k) is None and redis_connection.zscore('query_task_trackers:in_progress', k) is None:
            redis_connection.delete(k)   

This script is not efficient, but will do the job. Note that it supposed to be run from your Redash directory (usually /opt/redash/current) using the bin/run utility.

@arikfr arikfr merged commit 3f90dd9 into master May 19, 2016

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@arikfr arikfr deleted the fix/keys_cleanup branch May 19, 2016

simo7 pushed a commit to pubnative/redash that referenced this pull request Sep 22, 2016

Merge pull request getredash#1064 from getredash/fix/keys_cleanup
Fix: old task trackers were not really removed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.