Routine storage hygiene maintains optimal performance and prevents an overrun of contracted storage limits as applications grow.
Troubleshoot file system storage
File system storage use increases mainly because of accumulated log files, uncompressed assets, temporary files, or old environment backups. The following section provides instructions on how to manage and reduce storage volumes:
Clear temporary files: Open the temporary file directory at /mnt/tmp/ and delete old or unnecessary temporary files.
Clean up orphaned managed files: Drupal tracks uploaded files in the file_managed table. Cron must purge files that never attach to content.
Remove old backups: Check for manual database dumps with sql or sql.gz extensions, or codebase archives with tar.gz extensions left behind in the file system after deployments or testing, especially in non-production environments.
Audit log directories: Massive, unrotated log files consume gigabytes of space. Ensure that custom log mechanisms rotate and archive logs properly, and delete outdated logs.
Offload large media assets: For applications that host large media libraries, move assets from the file system allocation of the subscription to external object storage such as Amazon S3 with the S3 File System Drupal module.
Clear image styles: Drupal generates image styles such as thumbnails and resized images, which bloat the sites/default/files/styles directory over time. Clear image styles through Drush to delete these generated images safely and free up space.
Clear aggregated assets: Compiled asset bundles accumulate in sites/default/files/css/ and sites/default/files/js/. Deletion of these bundles is safe because they regenerate when needed.
Avoid file duplication: Do not copy the entire production sites/default/files directory to lower environments unless you actively test media features. Stage file directories often contain years of orphaned assets that remain uncleaned.
Troubleshoot Database Storage
Database storage use increases mainly because of large tables, accumulated cache data, application logs stored in the database, excessive content revisions, retained database backups, binary logs, inefficient data models, or a lack of regular maintenance. The following section provides instructions to manage and reduce storage volumes:
Identify large tables first: Surface the largest tables before you act.
Manage Drupal cache table growth: Drupal stores cached data in database tables such as cache_page, cache_render, cache_dynamic_page_cache, and cache_bootstrap. On high-traffic sites, these tables can grow significantly over time if not regularly cleared. Scheduling periodic cache maintenance is an optional but recommended best practice that helps keep database sizes manageable and reduces the risk of backup failures, migration blockers, and operational incidents. Refer to Manage Drupal cache table growth below for guidance.
Clear the watchdog database log table: Truncate the watchdog table because the table becomes large if the application logs errors to the database instead of the file system. You must configure Syslog to route logs to the file system.
Clean up revisions: Drupal stores a revision every time content updates. Use modules such as
Node
Revision Delete to safely bulk-delete outdated content revisions.
Manage Drupal cache table growth
Drupal stores cached data in database tables such as cache_page, cache_render, cache_dynamic_page_cache, and cache_bootstrap. On high-traffic sites, these tables can grow significantly over time — in some cases to hundreds of gigabytes — if not regularly cleared. When cache tables grow excessively large they can cause:
Database backup failures due to table lock contention during large table dumps
Blocked or delayed site migrations and environment cloning
Increased database storage consumption affecting overall environment health
Scheduling periodic cache maintenance is an optional but recommended best practice that helps keep database sizes manageable. Routine Drupal cache maintenance remains a customer-side application maintenance responsibility. Acquia Cloud Platform manages platform infrastructure.
Checking cache table sizes
To assess how much space your cache tables are consuming, connect to the database and run the following query. You can run this through drush sqlc or Cloud Platform database tools.
SELECT table_name,
ROUND(((data_length + index_length) / 1024 / 1024 / 1024), 2) AS size_gb
FROM information_schema.tables
WHERE table_schema = DATABASE()
AND table_name LIKE 'cache_%'
ORDER BY (data_length + index_length) DESC;
Clearing caches with Drush
For routine maintenance, drush cr (cache rebuild) is the recommended starting point. It rebuilds the Drupal cache registry and clears the majority of cache bins:
drush cr
The drush cr triggers Drupal's cache clear and rebuild logic but does not guarantee a TRUNCATE of all underlying database cache tables. For tables that have grown very large, a direct SQL truncate is more effective:
Always create a database backup before running TRUNCATE commands. Truncating a Drupal cache table does not destroy content, but creating a back up before performing manual database operations is good operational practice.
Scheduling periodic cache maintenance
Cloud Platform supports scheduled jobs and cron tasks. Acquia recommends scheduling periodic drush cr commands during off-peak hours to prevent cache tables from accumulating unchecked.
For example, use the following cron schedule to run the command at 2:00 a.m. on the 1st day of each month:
0 2 1 * *
Command: drush cr
For sites with known high-volume cache tables, such as sites with heavily cached anonymous page traffic, consider a more frequent schedule such as weekly or fortnightly. For more information, refer to Configuring scheduled jobs.
Sites that implement regular scheduled cache clears benefit from predictable database backup reliability, smoother environment cloning and migrations, and lower ongoing storage consumption.
Additional Storage Options
Contact your Account Manager or Acquia Support to discuss right-sizing your storage entitlement to accommodate growth if the application genuinely requires additional storage capacity.
Manage storage volume
Routine storage hygiene maintains optimal performance and prevents an overrun of contracted storage limits as applications grow.
Troubleshoot file system storage
File system storage use increases mainly because of accumulated log files, uncompressed assets, temporary files, or old environment backups. The following section provides instructions on how to manage and reduce storage volumes:
Clear temporary files: Open the temporary file directory at /mnt/tmp/ and delete old or unnecessary temporary files.
Clean up orphaned managed files: Drupal tracks uploaded files in the file_managed table. Cron must purge files that never attach to content.
Remove old backups: Check for manual database dumps with sql or sql.gz extensions, or codebase archives with tar.gz extensions left behind in the file system after deployments or testing, especially in non-production environments.
Audit log directories: Massive, unrotated log files consume gigabytes of space. Ensure that custom log mechanisms rotate and archive logs properly, and delete outdated logs.
Offload large media assets: For applications that host large media libraries, move assets from the file system allocation of the subscription to external object storage such as Amazon S3 with the S3 File System Drupal module.
Clear image styles: Drupal generates image styles such as thumbnails and resized images, which bloat the sites/default/files/styles directory over time. Clear image styles through Drush to delete these generated images safely and free up space.
Clear aggregated assets: Compiled asset bundles accumulate in sites/default/files/css/ and sites/default/files/js/. Deletion of these bundles is safe because they regenerate when needed.
Avoid file duplication: Do not copy the entire production sites/default/files directory to lower environments unless you actively test media features. Stage file directories often contain years of orphaned assets that remain uncleaned.
Troubleshoot Database Storage
Database storage use increases mainly because of large tables, accumulated cache data, application logs stored in the database, excessive content revisions, retained database backups, binary logs, inefficient data models, or a lack of regular maintenance. The following section provides instructions to manage and reduce storage volumes:
Identify large tables first: Surface the largest tables before you act.
Manage Drupal cache table growth: Drupal stores cached data in database tables such as cache_page, cache_render, cache_dynamic_page_cache, and cache_bootstrap. On high-traffic sites, these tables can grow significantly over time if not regularly cleared. Scheduling periodic cache maintenance is an optional but recommended best practice that helps keep database sizes manageable and reduces the risk of backup failures, migration blockers, and operational incidents. Refer to Manage Drupal cache table growth below for guidance.
Clear the watchdog database log table: Truncate the watchdog table because the table becomes large if the application logs errors to the database instead of the file system. You must configure Syslog to route logs to the file system.
Clean up revisions: Drupal stores a revision every time content updates. Use modules such as
Node
Revision Delete to safely bulk-delete outdated content revisions.
Manage Drupal cache table growth
Drupal stores cached data in database tables such as cache_page, cache_render, cache_dynamic_page_cache, and cache_bootstrap. On high-traffic sites, these tables can grow significantly over time — in some cases to hundreds of gigabytes — if not regularly cleared. When cache tables grow excessively large they can cause:
Database backup failures due to table lock contention during large table dumps
Blocked or delayed site migrations and environment cloning
Increased database storage consumption affecting overall environment health
Scheduling periodic cache maintenance is an optional but recommended best practice that helps keep database sizes manageable. Routine Drupal cache maintenance remains a customer-side application maintenance responsibility. Acquia Cloud Platform manages platform infrastructure.
Checking cache table sizes
To assess how much space your cache tables are consuming, connect to the database and run the following query. You can run this through drush sqlc or Cloud Platform database tools.
SELECT table_name,
ROUND(((data_length + index_length) / 1024 / 1024 / 1024), 2) AS size_gb
FROM information_schema.tables
WHERE table_schema = DATABASE()
AND table_name LIKE 'cache_%'
ORDER BY (data_length + index_length) DESC;
Clearing caches with Drush
For routine maintenance, drush cr (cache rebuild) is the recommended starting point. It rebuilds the Drupal cache registry and clears the majority of cache bins:
drush cr
The drush cr triggers Drupal's cache clear and rebuild logic but does not guarantee a TRUNCATE of all underlying database cache tables. For tables that have grown very large, a direct SQL truncate is more effective:
Always create a database backup before running TRUNCATE commands. Truncating a Drupal cache table does not destroy content, but creating a back up before performing manual database operations is good operational practice.
Scheduling periodic cache maintenance
Cloud Platform supports scheduled jobs and cron tasks. Acquia recommends scheduling periodic drush cr commands during off-peak hours to prevent cache tables from accumulating unchecked.
For example, use the following cron schedule to run the command at 2:00 a.m. on the 1st day of each month:
0 2 1 * *
Command: drush cr
For sites with known high-volume cache tables, such as sites with heavily cached anonymous page traffic, consider a more frequent schedule such as weekly or fortnightly. For more information, refer to Configuring scheduled jobs.
Sites that implement regular scheduled cache clears benefit from predictable database backup reliability, smoother environment cloning and migrations, and lower ongoing storage consumption.
Additional Storage Options
Contact your Account Manager or Acquia Support to discuss right-sizing your storage entitlement to accommodate growth if the application genuinely requires additional storage capacity.
Process and purge queue tables: The queue table can accumulate a backlog from inactive modules. Check for stale items.
Optimize tables: After you delete a large amount of data, such as when you truncate tables or delete revisions, the database retains the allocated space. Run an OPTIMIZE TABLE command to reclaim this unused, fragmented space.
Sanitize database synchronizations: When you copy a production database to a staging environment, do not synchronize unnecessary tables such as watchdog or massive cache tables. Use Drush aliases to exclude these tables during synchronizations and help reduce non-production database storage.
Remove unnecessary database backups: Check for manual database dumps stored in the file system and remove those that are no longer required, particularly in non-production environments.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Process and purge queue tables: The queue table can accumulate a backlog from inactive modules. Check for stale items.
Optimize tables: After you delete a large amount of data, such as when you truncate tables or delete revisions, the database retains the allocated space. Run an OPTIMIZE TABLE command to reclaim this unused, fragmented space.
Sanitize database synchronizations: When you copy a production database to a staging environment, do not synchronize unnecessary tables such as watchdog or massive cache tables. Use Drush aliases to exclude these tables during synchronizations and help reduce non-production database storage.
Remove unnecessary database backups: Check for manual database dumps stored in the file system and remove those that are no longer required, particularly in non-production environments.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.