Drupal and tmp folder
The information in this post is accurate as of the published date . Please make sure to check any linked documentation within the post for changes/updates.
Hi,
In the Drupal (10) template, the tmp directory is mounted on /app/tmp, so that “Drupal gets its own dedicated tmp directory”:
mounts:
…
# Drupal gets its own dedicated tmp directory. The settings.platformsh.php
# file will automatically configure Drupal to use this directory.
'/tmp':
source: local
source_path: ‘tmp’
…
What's the reason to give Drupal its dedicated tmp directory, instead of using system default, as upstream Drupal's default, or /tmp as commented out in upstream default.settings.php? Is there something specific to platform.sh or is it just to not mix Drupal tmp files with other tmp files, and eventually risking the system to remove those files before they are fully handled by Drupal?
Thank you!
NB: question asked there as well.
-
Hello! There's nothing to my mind specific to Platform.sh here, only an attempt to replicate what you mentioned being in
default.settings.php
on our filesystem with a mount.0 -
The reason for this is that if you are on a cluster with multiple nodes every node has its own /tmp folder and if node a) has some relevant data in there and node b) responses which dont has it you will get some unexpected behaviour. Like Backend css not loading when you have css aggregation on.
0
Please sign in to leave a comment.
Comments
2 comments