Undeleted temporary files

Created on 3 July 2018, over 6 years ago
Updated 17 November 2023, about 1 year 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 about 1 year 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 about 1 year 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 about 1 year ago
    22 pass
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 7.x + Environment: PHP 5.6 & MySQL 5.5
    last update about 1 year ago
    22 pass
  • πŸ‡ΊπŸ‡ΈUnited States csmdgl

    Version of the patch for PHP 7

  • Status changed to Closed: won't fix 13 days ago
  • πŸ‡¬πŸ‡§United Kingdom steven jones

    Sorry for the lack of attention to your issue, please accept my apologies.

    Drupal 7 is going to be end-of-life'd by the community in approximately 1 month. β†’

    As such, I am closing all non-critical looking, non-PHP compatibility issues for Views Data Export to tidy up the issue queues and reduce the noise. You can read about this on #3492246: Close down Drupal 7 issues.

    If you feel like this issue has been closed by mistake, please do comment about re-opening it.
    If you feel like the ticket is still relevant for the 8.x-1.x version of the module, then please search for a duplicate issue first, and if there really isn't one (and you've looked properly) then change the version on the ticket and re-open.

    Thanks to everyone involved in this issue: for reporting it, and moving it along, it is truly appreciated.
    The Drupal community wouldn't be what it is today without your involvement and effort, so I'm sorry that we couldn't get this issue resolved. Hopefully we'll work together in a future issue though, and get that one resolved :)

Production build 0.71.5 2024