Uploaded image for project: 'Archive of Our Own'
  1. AO3-5630

Download files are not always removed from /tmp directory after generation

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: High
    • Resolution: DeployedToBeta
    • Affects versions: 0.9.237
    • Fix versions: 0.9.238
    • Milestone:
      Internal 0.9
    • Difficulty:
      Medium
    • Roadmap:
      Export
    • Components:
      BackEnd

      Description

      We currently have some code that is intended to remove download files from the /tmp folder after the download is generated.

      However, this code does not always work, causing the /tmp folder to fill up. This has always been the case, but it is an even bigger problem than it was previously because, now that we include images in downloads, a single work with images can take up 10% of the allotted space.

      Testing

      Not really testable. We can confirm downloads still work, though – probably using a new work to make sure it’s not only working because it’s cached.

      Notes

      redsummernight [17:11]

      Please note that "after" filters are executed only after a successful action, but not when an exception is raised in the request cycle.
      "around" filters are responsible for running their associated actions by yielding, similar to how Rack middlewares work.

      if we use around_action with begin/ensure we can force /tmp cleanup to run no matter what

      redsummernight [17:12]
      https://guides.rubyonrails.org/action_controller_overview.html#after-filters-and-around-filters

        Attachments

          Activity

            People

            • Assignee:
              redsummernight redsummernight
              Reporter:
              sarken Sarken
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: