Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deployment.rst: Adding alternative way to clear the cache #19836

Closed
wants to merge 2 commits into from

Conversation

ThomasLandauer
Copy link
Contributor

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 ;-)

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* ;-)
@carsonbot carsonbot added this to the 5.4 milestone Apr 30, 2024
deployment.rst Outdated Show resolved Hide resolved
Co-authored-by: Simon André <[email protected]>
@javiereguiluz
Copy link
Member

I'm closing this one as "won't fix". The reason is that it doesn't feel correct to show this as an official best-practice.

If you run cache:clear --no-warmup it will probably work as expected, so the "issue" might be in the warm-up process. Most folks can run that command without any issues ... but, in edge-cases, you might have to run it as php -d memory_limit=-1 bin/console cache:warmup Setting unlimited memory might look bad, but it's common e.g. when running Composer commands to install/update.

Thanks.

@ThomasLandauer
Copy link
Contributor Author

@javiereguiluz On a shared webhost, you cannot increase memory.
That's why I still think it's a good idea to show this as last resort - not as best practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants