symfony-bridge
symfony-bridge copied to clipboard
With cache warmup i have Warning: touch(): Unable to create file /var/task/var/cache/prod/Container3BKBjE9.legacy because Read-only file system
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
Only at the first run of lambda
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 ?
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
👍 I found the root cause, it's append when you update Symfony in Symfony 6.2
Now have this error on all version 6.*
I found the probleme !!! it's only APP_DEBUG = true
make this error !!!
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 :thinking:
May be add more warning on the Bref/Symfony documentation will be enough