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

With cache warmup i have Warning: touch(): Unable to create file /var/task/var/cache/prod/Container3BKBjE9.legacy because Read-only file system #62

Open
cedric-r-mycelium opened this issue Dec 13, 2022 · 7 comments

Comments

@cedric-r-mycelium
Copy link

cedric-r-mycelium commented Dec 13, 2022

Symfony 6.1 6.2

if a had - 'var/cache/prod/**' to servelerless.yaml package patterns i have this error

Warning: touch(): Unable to create file /var/task/var/cache/prod/Container3BKBjE9.legacy because Read-only file system

image

Only at the first run of lambda

@t-richard
Copy link
Member

The .legacy extension lead me to think the cache you uploaded to lambda is not "fresh" and so Symfony tries to generate a new one. Did you include your var/cache/prod folder in your deployment package and did you run bin/console cache:warmup ---env=prod before the deployment ?

@cedric-r-mycelium
Copy link
Author

i have a makefile for my deploy and in this file i have :
@php bin/console cache:warmup --env=prod --no-debug
sls deploy --stage=prod --region=eu-west-1

@cedric-r-mycelium
Copy link
Author

cedric-r-mycelium commented Dec 23, 2022

👍 I found the root cause, it's append when you update Symfony in Symfony 6.2

@cedric-r-mycelium
Copy link
Author

Now have this error on all version 6.*

@cedric-r-mycelium
Copy link
Author

I found the probleme !!! it's only APP_DEBUG = true make this error !!!

@t-richard
Copy link
Member

oh interesting, thanks for getting back to us with what you found !

Indeed the bridge is intended for production use and assumes you're running a APP_ENV=prod and APP_DEBUG=false because those versions generate stable var/cache folders.

But you're not the first one reporting something linked to running Symfony in a non-prod config, maybe we should reconsider that at some point 🤔

@cedric-r-mycelium
Copy link
Author

May be add more warning on the Bref/Symfony documentation will be enough

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

No branches or pull requests

2 participants