Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

prune_old_outbound_device_pokes is burning CPU on the master #7121

Closed
richvdh opened this issue Mar 21, 2020 · 1 comment
Closed

prune_old_outbound_device_pokes is burning CPU on the master #7121

richvdh opened this issue Mar 21, 2020 · 1 comment
Assignees

Comments

@richvdh
Copy link
Member

richvdh commented Mar 21, 2020

Every hour, it runs for 20 minutes. It's running in a database thread but I suspect it's holding the GIL for a lot of that time,

It's table-scanning the whole table, and then doing a query on every single (user_id,destination) in the table (over a million of them). The code doesn't seem to realise that users might have more than one device. We either need to optimise the query, or move the pruned remnants out to a separate table so that we aren't redoing the same work the whole time.

Related: #4115

@richvdh richvdh self-assigned this Mar 23, 2020
@richvdh
Copy link
Member Author

richvdh commented Mar 30, 2020

I hope this is fixed by #7159

@richvdh richvdh closed this as completed Mar 30, 2020
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

1 participant