5

On production we use amazon opsworks to orchestrate our machines. I've created a chef recipe to deploy new code (so actually creating a new release folder, do things there, then switch symlink to new folder) and another recipe that reconfigures our symfony app changing a yml file when a new database slave is added and so on.

The problem is that the reconfigure stage happens on current running code and since I've to run cache:clear and cache:warmup the requests in the meanwhile fails since they don't find cache files/folders.

How could I clear the cache instantly? Maybe warming it up in another folder and then switching those?

Better solutions?

4

1 回答 1

2

Found by myself that cache:clear (without --no-warmup) actually does the warmup in another folder and exchanges them on finish.

The reason I wasn't using that was due some library issues on warmup when not using --no-warmup && cache:warmup which seems to be solved now.

Let's see how things works after this change and if I don't get these problems anymore

UPDATE:

I did some tests of firing up new machines, running cache:clear under heavy request load and no php warnings/errors so far.

I think this is a definitive solution for my problem

于 2013-09-16T09:32:10.957 回答