jakuza
jakuza

Reputation: 51

Capifony fails warming the cache

Yesterday I made my 40th or 50th deployment of a Symfony2 system on a server. Everything fine so far. Today I get a nasty error. This is what happens:

 * executing `symfony:cache:warmup'
 * executing "cd /NFS2/oa_sf2/releases/20111214182506 && php app/console cache:warmup --env=prod"
    servers: ["151.1.111.19"]
    [151.1.111.19] executing command
 ** [out :: 151.1.111.19] Warming up the cache
 ** [out :: 151.1.111.19] 
 ** [out :: 151.1.111.19] 
 ** [out :: 151.1.111.19] 
 ** [out :: 151.1.111.19] [RuntimeException]
 ** [out :: 151.1.111.19] Error creating output file.
 ** [out :: 151.1.111.19] 
 ** [out :: 151.1.111.19] 
 ** [out :: 151.1.111.19] 
 ** [out :: 151.1.111.19] cache:warmup
 ** [out :: 151.1.111.19] 
 ** [out :: 151.1.111.19] 
    command finished
*** [deploy:update_code] rolling back

Please any suggestion on how to bring investigation forward? Thanks a lot.

p.s. no similar question on Stacktrace addresses this peculiar issue.

Upvotes: 5

Views: 1506

Answers (3)

giorrrgio
giorrrgio

Reputation: 502

The cache warming is a symfony task AFAIU, it can be inspected through XDebug or its profiler.

Upvotes: 0

Jakub Zalas
Jakub Zalas

Reputation: 36231

I think it's not really a Capifony related question. In the end it only runs the Symfony command.

First try running cache:warmup task manually on the server.

It might be a permissions problem. Check what are the rights to the cache directory just before the warmup. You can do that by overwriting the task (just copy it and run ls -l on the cache directory before running an actual command).

You don't have to deploy every time to see what's wrong. Run cache:warmup command itself:

cap symfony:cache:warmup

I greped Symfony 2.0.7 sources and the assetic's YUI compressor is the only place where such exception is thrown (see link). This suggests it's a problem related to compressing your assets with assetic. Might be you added this feature recently and don't have java installed on the server.

Upvotes: 3

Stefano Sala
Stefano Sala

Reputation: 907

Disk full? Maybe it gets full once it tries to warmup the cache.

Upvotes: 0

Related Questions