Undeleted temporary files

Created on 3 July 2018, over 6 years ago
Updated 17 November 2023, 12 months ago

I've been looking through the issue queue and it seems like this problem should be fixed (per Undeletable temporary files β†’ ) however my log is full of "The file temporary://views_data_export3ZIbJ2 was not deleted, because it does not exist." and "Did not delete temporary file "temporary://views_data_exportMOerWx" during garbage collection, because it is in use by the following modules: views_data_export." I have 730 pages of these messages, all from today and the last couple of cron jobs.

Drupal 7 and I'm using 7.x-3.2 of Views Data Export. I don't have direct access to the database nor do I have command line access to the server nor drush, etc.

Something has ground our site to a halt and the volume is full of temporary files that ought to have been deleted. I think that the views data export deletions are taking so long/failing and clogging up the cron queue so that garbage collection isn't happening on our other temporary files.

I've seen people mention the files_managed and file_usage tables. Can I remove these files directly from there to hopefully enable cron to run correctly? I need to be exact in the instructions. Since I can't access the database directly, I have to pass along info to the server admin, who does not understand Drupal.

thank you

πŸ’¬ Support request
Status

Needs review

Version

3.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dflitner

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.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 7.x + Environment: PHP 5.6 & MySQL 5.5
    last update 12 months ago
    PHPLint Failed
  • πŸ‡ΊπŸ‡ΈUnited States csmdgl

    Step #2 of views_data_export_garbage_collect() function should indeed take care of deleting the temporary files. However, in cases where that delete fails for whatever reason, the file_usage entry is not removed from the database, but the views_data_export entry is. The file_delete() only removes the file_usage if the actual file delete was successful, even when the force parameter is true. The attached patch explicitly removes the file_usage before doing the delete. This will allow system_cron to attempt to delete the stuck expired temporary file without logging an error that it is in use by views_data_export. Additionally, make sure that views_data_export_cron runs prior to system_cron so this garbage collect happens before system_cron.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 7.x + Environment: PHP 7 & MySQL 5.5
    last update 12 months ago
    run-tests.sh fatal error
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 7.x + Environment: PHP 5.6 & MySQL 5.5
    last update 12 months ago
    22 pass
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 7.x + Environment: PHP 5.6 & MySQL 5.5
    last update 12 months ago
    22 pass
  • πŸ‡ΊπŸ‡ΈUnited States csmdgl

    Version of the patch for PHP 7

Production build 0.71.5 2024