forked from HHS/TANF-app
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Spike - testing CSV exports in production #3201
Comments
This research may best be done after the introduction of #3046 |
andrew-jameson
added
the
Refined
Ticket has been refined at the backlog refinement
label
Oct 7, 2024
celery |
Summary of testing so far
Test RunsTest script: while true
do
echo "Watching memory..."
# cf app tdp-backend-raft | grep "#0" >> memory.txt
cf app tdp-backend-raft | grep -e "type:" -e "#0" >> memory.txt
sleep 1
done Results in a 4 line set like this every second
Run 1: memory-raft-1-debug-on.txt
Run 2: memory-raft-2-debug-off.txt
Run 3: memory-raft-3-debug-on.txt
Run 4: memory-raft-4-debug-on.txt
Run 5: memory-raft-5-debug-off.txt
Run 6: memory-raft-6-debug-off.txt
Next steps
Possible solutions
|
|
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
#3162 addressed memory issues related to the csv export, noted in #3137 and #3138. While testing the solution, we noticed an out-of-memory error is still possible, but substantially more records are able to be reliably exported before the export breaks. The limitations are noted in @ADPennington 's comment on 3162.
Since we are no longer caching the queryset and file I/O operations are done as efficiently as possible using python
io
andgzip
, the thought is that the celery worker is leaking memory. Indeed the following warning message is present everywhere we useDJANGO_DEBUG=True
(which is the case for all deployed dev environments)In dev environments, we can turn this setting to
False
to test this assumption. In production,DJANGO_DEBUG
isFalse
already, so we'd like to observe the behavior of the csv export in production with the following questions in mind:Open Questions:
Please include any questions, possible solutions or decisions that should be explored during work
DJANGO_DEBUG=False
)? 900k-1m+?Deliverable(s):
Create a list of recommendations or proofs of concept to be achieved to complete this issue
DJANGO_DEBUG
toFalse
in a non-prod environment. Run exports of 600k, 900k, 1m+ rows and observe memory.Supporting Documentation:
Please include any relevant log snippets/files/screen shots
In QASP, this was tested by running the following script while a csv export was simultaneously run
DJANGO_DEBUG=True
, export of ~950k recordsThe text was updated successfully, but these errors were encountered: