LnD: investigation into restart submission report generation #7551
+11
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
When CCMS submissions were restarted on the morning of 20 Dec the submissions restarted but the reports did not generate as expected.
This PR identified an issue where CCMS submissions have been paused during an evening downtime. Previously we had only seen 2 or 3 submissions maximum.
On this occasion there were 10 applications to restart. This turned out to be too many!
I recreated the situation, 10 paused applications, and turned the submissions back on. The first 5 (each sidekiq worker has 5 threads) requested a CCMS case reference and then tried to generate reports at the same time... the worker container ran out of memory and crashed. When a new pod was spawned, the next 5 started. This left all 10 applications trying to build reports and failing.
Working as a team we identified that Sidekiq Capsules should work for us, I restored a backup of the test branch with 10 paused applications and created a new report_creator queue with two threads. This allowed two applications to build reports simultaneously and successfully cleared the paused submissions
Checklist
Before you ask people to review this PR:
bundle exec rake
git rebase main
.