1

When staging the application on Swisscom Application Cloud (Cloud Foundry based), PHP framework Symfony is calling bin/console cache:clear to clear the caches to warm up the application.

We found out earlier, that as no connection was allowed to e.g. SQL Service during staging this command failed and was resolved by allowing DB Service connection during staging phase.

No we experience a connection refused during staging for our Redis Service connection:

Redis connection failed (connect() failed: Connection refused): redis://OURPASSWORD@xxxxxx.service.consul:47133

But Symfony requires db and cache services to be available already during staging.

Community
  • 1
  • 1
LBA
  • 3,859
  • 2
  • 21
  • 60
  • It sounds like if you don't have access to the database and this command needs it you need to look into either overriding the command behaviour or disabling it. If it's called by the composer post install script I think you can modify it to run a different command. You might also look into [adding configuration to avoid the database checks](http://stackoverflow.com/questions/34023813/symfony-2-7-cacheclear-command-checks-every-database-connection) – mickadoo Feb 16 '17 at 11:09
  • thanks @mickadoo, but the issue is that both services are existing, only composer post install script still runs during staging phase. for DB service `swisscomdev` already changed access rights during staging, for Redis service it seems not so far. I already reached out to their support as well. It does not make sense to disable cache:clear as part of staging/postinstall. – LBA Feb 16 '17 at 11:36
  • That's a good point. I think you're right to contact support - you want your staging environment as similar to production as possible. – mickadoo Feb 16 '17 at 11:43

0 Answers0