Problems clearing cache in clustered environment #7901
Unanswered
linkebon
asked this question in
Q&A / Support
Replies: 2 comments
-
One idea that we have is to not share the var/cache between the appservers and hope that it solves the issues. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Not running the cache as a network disc seems to have solved the problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Pimcore: 6.6.10
Php: 7.4
Setup:
2 application servers running docker containers with image: pimcore/pimcore:PHP7.4-apache
{pimcoreroot}/var is a shared network volume nfs between two servers which is mounted in the containers.
Problem:
We try to achieve 0 downtime deploys and when we are run the command: bin/console cache:clear --no-warmup && bin/console pimcore:cache:clear
This is the error:
"In Filesystem.php line 181: Failed to remove directory "/var/www/html/var/cache/nr": rmdir(/var/www/html/var/cache/nr): Directory not empty"
it always fails the first time due to the error. We believe this issue occurs because there is incoming requests to the apps while the folders under /var/cache is being cleared. The second time it works however because most of the files were probably deleted the first round and it goes much faster.
Any suggestions how to solve this on environments with heavy load?
Beta Was this translation helpful? Give feedback.
All reactions