Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.2? |
Steps to repeat:
-
git clone git@github.com:weaverryan/flex-redis-bug.git
-
composer install
It will explode with:
The project is a standard Flex app, but with the following changes:
A) Doctrine ORM is installed
B) The app
cache uses redis (see framework.yaml
)
C) We're in the prod
environment
The error happens on cache:clear
. This comes from the result cache configured by default in prod
for Doctrine: https://github.com/symfony/recipes/blob/93d80647f510e00a52db869251136593a2dc2182/doctrine/doctrine-bundle/1.6/config/packages/prod/doctrine.yaml#L28
This is caused by a lack of laziness... somewhere. It could be in Doctrine - this whole thing starts when we try to warmup the proxies... which instantiates the entity managers (which instantiates result caches and also connection objects). Or, it could be in the Cache component, where (at least with Redis) a connection to the Redis server is established in order to create the RedisAdapter
object (even if you never make any connections to it).
Thanks!