5

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
  • No chance for further investigation into the cache folder because the whole code tree gets removed on rollback
  • We know Capistrano features some way to disable the rollback but still we'd like to try understanding with no access on remote server - it must be something on our side, since yesterday it was all OK
  • No change was made on the deployment user's read/write/execute rights

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

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

j0k
  • 22,600
  • 28
  • 79
  • 90
jakuza
  • 51
  • 4

3 Answers3

3

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.

Jakub Zalas
  • 35,761
  • 9
  • 93
  • 125
  • 1
    It seems like we cannot run the YUI compressor. java is installed though. For the record I'll post here any insight might pop up. Thanks a lot so far! – jakuza Dec 15 '11 at 11:16
0

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

Stefano Sala
  • 907
  • 4
  • 7
0

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

giorrrgio
  • 502
  • 1
  • 4
  • 10