Temp folder runs out of space after failed exports
This course in studio has many images which presumably is keeping export from working:
The course team needs to use import/export to add polls.
To reproduce, go to https://studio.edx.org/export/slashes:VJx+VJx+3T2014 and click export. It will time out or give an error:
There has been an error with your export.
There has been a failure to export your course to XML. Unfortunately, we do not have specific enough information to assist you in identifying the failed component. It is recommended that you inspect your courseware to identify any components in error and try again.
The raw error message is:
[Errno 28] No space left on device
Steps to Reproduce
Reason for Variance
User Impact Summary
, gunicorn was rolled back after the release yesterday. But ostensibly it will be upgraded again.
The MIT 7.00x team cannot export the course. It seems likely that it's the same issue VJx was seeing: https://openedx.atlassian.net/browse/PLAT-82 and ✓ Cannot export from studio
Unlike VJx, this course is running, the file hosting arrangement cannot be easily changed. Can you advise on next steps? The course team simply wants to create a new branch of the same material, they aren't looking to export regularly.
1. visit the course export page https://studio.edx.org/export/MITx/7.00x_2/2T2014
3. end up with a blank page at this URL: https://studio.edx.org/export/MITx/7.00x_2/2T2014?_accept=application/x-tgz
During fix for https://github.com/edx/edx-platform/pull/4560, I have checked that for each uploaded course there is only one tmp file which is the last uploaded file chunk (size<20Mb set by fileupload jquery in import.html) created by django https://docs.djangoproject.com/en/1.4/topics/http/file-uploads/#where-uploaded-data-is-stored. It does not depend on if worker got completed successfully or timeout.
After the upload complete the uploaded course tarball is saved on data folder "/edx/var/edxapp/data/org-course-run" and extracted there. If the worker completes its task then the temp data folder are cleaned up but if worker timeout during import then for gunicorn (0.17.4) SIGKILL signal (https://github.com/benoitc/gunicorn/blob/0.17.4/gunicorn/arbiter.py#L401-L411) is sent when immediately terminates the worker/process and no cleanup is done for temp data folder.
But new version of gunicorn (19.1.0) sends SIGABRT signal (https://github.com/benoitc/gunicorn/blob/19.0/gunicorn/arbiter.py#L425-L440) on worker timeout which gives time to worker to do cleanup tasks (execute code in "finally" clauses) before it is killed so we need to update gunicorn.