0

Each minute, I have a K8S Cronjob who run Symfony command. My problem is the huge time my pod warmup Symfony cache before execute the command : 56s ...

I search a solution for stock the cache in docker container but i can't execute cache:warmup during docker build, because commande need database and redis up.

Do you have a solution for me ?

Thanks !

Axel
  • 46
  • 2
  • i don´t quite understand, once the caches are generated why would they have to be regenerated a minute later? Isn´t that the opposite of what a cache is for? Or maybe i am misreading, it kinda reads like your docker-container gets build every minute? Cant you just issue the warmup command after database and redis r up?` – john Smith Jun 30 '22 at 15:39
  • probably the sf-command called by cron has a cache clear in itself which might be unnecesseray – john Smith Jun 30 '22 at 15:41
  • Could you try to run another command (for example, `bin/console about` on the docker build? It may create the cache – Artem Jun 30 '22 at 16:05
  • @johnSmith The docker image I'm using to run my cron doesn't have the cache inside, it's like Symfony has never been run. When running the Symfony command, it will generate the cache "App_KernelProdContainer.php" for example. – Axel Jul 01 '22 at 06:20
  • @Artem To create the cache, Postgres and Redis must be running – Axel Jul 01 '22 at 06:22
  • @Axel could you provide more details on why Postgres and Redis must be running? – Artem Jul 01 '22 at 08:10
  • as an option, you can install Postgres and Redis, warn up cache and remove Postgres and Redis – Artem Jul 01 '22 at 08:13

0 Answers0