The temporary files directory in Drupal is the location on your infrastructure where Drupal core and contributed modules upload files and media items for processing.
Acquia's require line in your website's settings.php file configures the location of your temporary files directory to /mnt/tmp/[sitename].[env], where [sitename] is your application name and [env] is the environment. This location is available as an environment variable.If this path is misconfigured or overridden to point to the node-local /tmp directory, both file uploads and media uploads, such as images and documents managed through Drupal Media Library, fail in multi-node environments.
For a full list of Cloud Platform file locations, see File locations.
For more information about Twig caches, see Twig caches.
Important considerations
Temporary files
The temporary files directory in Drupal is the location on your infrastructure where Drupal core and contributed modules upload files and media items for processing.
Acquia's require line in your website's settings.php file configures the location of your temporary files directory to /mnt/tmp/[sitename].[env], where [sitename] is your application name and [env] is the environment. This location is available as an environment variable.If this path is misconfigured or overridden to point to the node-local /tmp directory, both file uploads and media uploads, such as images and documents managed through Drupal Media Library, fail in multi-node environments.
For a full list of Cloud Platform file locations, see File locations.
For more information about Twig caches, see Twig caches.
Important considerations
If you cannot locate temporary files, you can create a custom directory on the shared file system to store temporary files. In addition, ensure that you provide an already existing path to the parameter to prevent issues with temporary files.
file_temp_path
If you modify the value of the file_temp_path parameter in Drupal's settings.php file, you might face issues. In such a case, ensure that you run Drupal cron to collect any old and garbage temporary files. In addition, you must set a low value for the file_temporary_max_age parameter in Drupal's settings.php file. This ensures that temporary garbage files are deleted sooner.
Do not set the temporary directory to /tmp. The /tmp directory is node-local and is not shared across web nodes. This causes both file uploads and media uploads to fail on multi-node Cloud Platform Enterprise environments. The /tmp directory is smaller than /mnt/tmp/[sitename].[env], runs out of space quickly, and the system purges it without notice.
The default value of file_temp_path parameter is /tmp.
Modules and the temporary directory
Drupal modules that write to temporary directories, includes the core Media module, Media Library, and media entity integrations, may require additional configuration to function properly in environments with multiple infrastructures, such as production environments for Cloud Platform Enterprise and Cloud Platform Site Factory. For more information, see Additional module issues and the following lists of modules:
If this content did not answer your questions, try searching or contacting our support team for further assistance.
If you cannot locate temporary files, you can create a custom directory on the shared file system to store temporary files. In addition, ensure that you provide an already existing path to the file_temp_path parameter to prevent issues with temporary files.
If you modify the value of the file_temp_path parameter in Drupal's settings.php file, you might face issues. In such a case, ensure that you run Drupal cron to collect any old and garbage temporary files. In addition, you must set a low value for the file_temporary_max_age parameter in Drupal's settings.php file. This ensures that temporary garbage files are deleted sooner.
Do not set the temporary directory to /tmp. The /tmp directory is node-local and is not shared across web nodes. This causes both file uploads and media uploads to fail on multi-node Cloud Platform Enterprise environments. The /tmp directory is smaller than /mnt/tmp/[sitename].[env], runs out of space quickly, and the system purges it without notice.
The default value of file_temp_path parameter is /tmp.
Modules and the temporary directory
Drupal modules that write to temporary directories, includes the core Media module, Media Library, and media entity integrations, may require additional configuration to function properly in environments with multiple infrastructures, such as production environments for Cloud Platform Enterprise and Cloud Platform Site Factory. For more information, see Additional module issues and the following lists of modules: