Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19538

Office import/export temp files can grow indefinitely and fill up the storage

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 13.4.3
    • Fix Version/s: None
    • Component/s: Office, WYSIWYG Editor
    • Labels:
      None
    • Difficulty:
      Medium
    • Similar issues:

      Description

      We have noticed a server running out of storage because /var/cache/tomcat9/Catalina/localhost/ROOT/xwiki-temp was using up 15GB of space.

      On closer inspection, the folder was full of many such folders which seem to be produced by the Office Importer Application:

      ...
      1.6M	./f01db8ee-9286-475d-805b-2883b4d28016
      1.5M	./736b9723-9f83-485c-8972-de305745ffa6/input
      4.0K	./736b9723-9f83-485c-8972-de305745ffa6/output
      1.6M	./736b9723-9f83-485c-8972-de305745ffa6
      1.5M	./05be9096-3410-4795-999b-5c001c8bc192/input
      4.0K	./05be9096-3410-4795-999b-5c001c8bc192/output
      1.6M	./05be9096-3410-4795-999b-5c001c8bc192
      1.5M	./cc77ec25-6641-4ab0-bb78-7096df68b245/input
      4.0K	./cc77ec25-6641-4ab0-bb78-7096df68b245/output
      1.6M	./cc77ec25-6641-4ab0-bb78-7096df68b245
      1.5M	./f061a350-6a0d-47b8-9773-48f7f319016f/input
      4.0K	./f061a350-6a0d-47b8-9773-48f7f319016f/output
      1.6M	./f061a350-6a0d-47b8-9773-48f7f319016f
      1.5M	./29d9fd3b-ccbb-4e9e-b4f1-09c22be714e4/input
      4.0K	./29d9fd3b-ccbb-4e9e-b4f1-09c22be714e4/output
      1.6M	./29d9fd3b-ccbb-4e9e-b4f1-09c22be714e4
      1.5M	./19130857-14d5-4e74-a65f-885aa218aed6/input
      4.0K	./19130857-14d5-4e74-a65f-885aa218aed6/output
      1.6M	./19130857-14d5-4e74-a65f-885aa218aed6
      1.5M	./a4dcf64f-e06a-487e-a2b1-35c63f90ae2c/input
      4.0K	./a4dcf64f-e06a-487e-a2b1-35c63f90ae2c/output
      1.6M	./a4dcf64f-e06a-487e-a2b1-35c63f90ae2c
      1.5M	./f004442f-52b1-410d-9c83-dd557745353c/input
      4.0K	./f004442f-52b1-410d-9c83-dd557745353c/output
      1.6M	./f004442f-52b1-410d-9c83-dd557745353c
      ...
      

      The contents of such a folder are:

      :/var/cache/tomcat9/Catalina/localhost/ROOT/xwiki-temp# ls -al 0f007328-015f-420d-87a4-fb5f42ee1ea5/
      total 2548
      drwxr-x---  4 tomcat tomcat    4096 Mar 19 17:20 .
      drwxr-x--- 18 tomcat tomcat 2588672 Mar 21 11:33 ..
      drwxr-x---  2 tomcat tomcat    4096 Mar 19 17:20 input
      drwxr-x---  2 tomcat tomcat    4096 Mar 19 17:20 output
      :/var/cache/tomcat9/Catalina/localhost/ROOT/xwiki-temp# ls -al 0f007328-015f-420d-87a4-fb5f42ee1ea5/input/
      total 1540
      drwxr-x--- 2 tomcat tomcat   4096 Mar 19 17:20 .
      drwxr-x--- 4 tomcat tomcat   4096 Mar 19 17:20 ..
      -rw-r----- 1 tomcat tomcat  19692 Mar 19 17:20 export_input.html
      -rw-r----- 1 tomcat tomcat 859180 Mar 19 17:20 pdf16395868788179670059.tmp
      -rw-r----- 1 tomcat tomcat 684268 Mar 19 17:20 pdf17423200223342402362.tmp
      :/var/cache/tomcat9/Catalina/localhost/ROOT/xwiki-temp# ls -al 0f007328-015f-420d-87a4-fb5f42ee1ea5/output/
      total 8
      drwxr-x--- 2 tomcat tomcat 4096 Mar 19 17:20 .
      drwxr-x--- 4 tomcat tomcat 4096 Mar 19 17:20 ..
      :/var/cache/tomcat9/Catalina/localhost/ROOT/xwiki-temp# 
      

      It looks like these temp files/folders never get cleaned. Upon tomcat restart, the files seem to be deleted automatically, but that's not very useful.

      We need to make sure to properly delete each such temp folder after a conversion is complete, regardless of its outcome and where it was performed from.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              surli Simon Urli
              Reporter:
              enygma Eduard Moraru
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: