Huge Temporary files Magick

Created on 27 June 2022, over 2 years ago
Updated 20 August 2023, over 1 year ago

Problem/Motivation

When upgrading to version 5.0 and after configuring the /media view, I have observed that in the /tmp directory of the system, magick-* files are being generated within systemd-private-xxxxxxxxxxxxxxxxxxxxxxxx-httpd.servicexxx, which have a considerable size and do not they are deleted causing the file system to run out of available space.
Any idea why?

Thanks.

🐛 Bug report
Status

Fixed

Version

6.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇱Netherlands johankleene Helmond

    This is still an issue, today disk was full, caused by huge amount of magick-... files in the tmp directory.

  • 🇩🇪Germany ayrmax

    Steps to reproduce

    Generate a PDF Image of a PDF with 160 or more pages.

    Proposed resolution

    The Media PDF Thumbnail Module utilizes the URI instead of the realpath. For instance, it employs the format public://foo/bar.pdf.

    When the path is remote, the spartie/pdf-to-image library generates images for every page of the PDF. It verifies whether the path is remote by using the filter_var($path, FILTER_VALIDATE_URL) function. However, when a Drupal URI is provided, the spartie/pdf-to-image library mistakenly considers the file as remote and proceeds to generate images for all pages.

    Consequently, when dealing with PDF files that contain numerous pages, imagick consumes a significant amount of temporary space on the server.

    I provided a patch to fix the issue.

  • 🇳🇱Netherlands johankleene Helmond

    Used the previous fix and the problem did not return.

    Patch does not apply against version 6.0.0-rc2, so this is a reroll against 6.0.0-rc2.

  • Status changed to Fixed over 1 year ago
  • 🇫🇷France sgostanyan

    Merged in 6.0.0-rc3

    Thanks

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024