Problem/Motivation
DB server stopped working, disk full due to large views export cache table 47G .ibd file mariadb
compleet DB export is 300MB
When doing a large view export to csv
Steps to reproduce
Do a lot of exports
Proposed resolution
Limit on some way, not logical the cache is larger than the complete DB itself
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | views_data_export-cleanup-cache-3186214-4.patch | 1.79 KB | csmdgl |
Comments
Comment #2
damienmckennaIf you look at views_data_export_cron() it runs views_data_export_garbage_collect() which goes through all of the exports and purges data from tables. I haven't looked into it in detail yet, but I wonder if the garbage collection logic is faulty?
Comment #3
littledynamo commentedSame issue here on a Drupal 9 site. views_data_export_object_cache table size gradually increased to 700MB, which is 70% of the database size and caused the client to hit the 1000MB ceiling on Siteground hosting.
Comment #4
csmdgl commentedIn D7, there is a bug in the logic of views_data_export_garbage_collect(). It is calling views_data_export_view_clear() with an array of eids, but views_data_export_view_clear() only works for an individual eid.
Patch attached.
Comment #5
csmdgl commentedComment #6
steven jones commentedSeems like this is pretty critical tbh, if that's what's going on/is wrong.
Comment #7
steven jones commented@csmdgl I'm not sure it's a bug, because in Drupal 7 it's actually the case that you can send a scalar or an array to a database condition and Drupal would pick out the right operator:
https://api.drupal.org/api/drupal/includes%21database%21query.inc/functi...
I'm going to close this issue down because Drupal 7 is EOL and I suspect that others have found ways around this in the meantime anyway.
Thanks for the effort everyone though.