From 33d8dd7a5d045ec1287c9b3c6c1ab10553d00c44 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Tue, 30 Apr 2024 12:49:05 +0200 Subject: [PATCH 1/2] Update deployment.rst: Adding alternative way to clear the cache Page: https://symfony.com/doc/5.x/deployment.html#d-clear-your-symfony-cache Reason: I have an app which "suddenly" produces a memory overflow upon `cache:clear`, but otherwise runs fine. Searching around, I found out that many people encounter this problem, for various reasons. So I'm figuring it's not so easy to really fix this in the Symfony code. So, I guess it's a good idea to show people an alternative way. Cause when deploying, and `cache:clear` crashes, you probably need a solution *fast* ;-) --- deployment.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deployment.rst b/deployment.rst index da05990b5ef..73061ba5b5b 100644 --- a/deployment.rst +++ b/deployment.rst @@ -200,6 +200,13 @@ Make sure you clear and warm-up your Symfony cache: $ APP_ENV=prod APP_DEBUG=0 php bin/console cache:clear +Alternatively, you can also delete the cache files manually. However, this does not +warm up the cache (so you should load your app afterwards): + +.. code-block:: terminal + + $ APP_ENV=prod APP_DEBUG=0 rm -rf var/cache/prod/* + E) Other Things! ~~~~~~~~~~~~~~~~ From be3e316802192ad4dabfba0fb89d7113f647acd0 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Wed, 1 May 2024 12:27:16 +0200 Subject: [PATCH 2/2] Update deployment.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Simon André --- deployment.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment.rst b/deployment.rst index 73061ba5b5b..bf09ddf4f17 100644 --- a/deployment.rst +++ b/deployment.rst @@ -205,7 +205,7 @@ warm up the cache (so you should load your app afterwards): .. code-block:: terminal - $ APP_ENV=prod APP_DEBUG=0 rm -rf var/cache/prod/* + $ rm -rf var/cache/prod/* E) Other Things! ~~~~~~~~~~~~~~~~