Conversation
OpenAPI ChangesShow/hide ## Changes for v0.yaml:Unexpected changes? Ensure your branch is up-to-date with |
613b734 to
42b9e2d
Compare
|
Since we had problems with the
The migration took 3 hours, 19 minutes and 11 seconds, equating to an average of 1,633 tokens processed / second. The strain seems to be mostly on the Django server with it taking 82% CPU and the DB container taking basically everything that remained, single threaded of course. The That iterator is processing the tokens one at a time and not batch updating, meaning Django has to individually fetch each token, then update it. My local instance remained accessible while this was running though. @blarghmatey Can we check how many tokens are currently in the production database? That way we can at least somewhat estimate how long this will take. It will obviously vary because whatever will be running this in K8S will have different performance characteristics than my workstation, but I think it's worth having at least an estimate? |
|
@mitodl/devops can we determine how many rows will need to be updated in production? Can we prune more of them? Note that our failure last time with this was exacerbated because the migration required a read lock on the database and the number of rows exceeded memory. We have since made changes to avoid the read lock requirement. Next step would be to try going to RC and monitor closely. If that goes ok, we can do the same in production. If the migration in production blocks the site from loading, we can abort it and make another plan. |
42b9e2d to
6b8e839
Compare
|
It looks like the failing python tests are not related to this PR. |
6b8e839 to
d1c68f1
Compare
|
Waiting on the approval to merge.... |
|
I'm running the |
d1c68f1 to
07294c2
Compare
|
resolved conflict with main |
@blarghmatey is this still something you are working on? |
|
Thanks for checking. Yes, I am still trying to get a complete run of cleartokens to execute. I keep getting interrupted due to the Celery pod getting replaced during deploys. So far it has been running for the past ~5 hours and is still executing. Unfortunately that command doesn't create any output so it's hard to gauge how long it will take overall. |
|
@annagav @blarghmatey Just to close the loop here, as of yesterday afternoon we've cleared the table of all expired access tokens. I believe this PR should be unblocked as a result! More details can be found in and around this thread, but feel free to reach out if you've got any other questions about the state of things and I'll do my best to help! |
07294c2 to
2d9d6f6
Compare
What are the relevant tickets?
Related to #3133
Related to https://github.com/mitodl/hq/issues/9393
Description (What does it do?)
Upgrading django-oauth-toolkit to 3.1
How can this be tested?
Run migrations
nothing should break