Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying Rails 4.1 to AWS failed to precompile assets

I know this sounds noob, but I can't get a clue on what is wrong.

I've created a EB instance with passenger, following a tutorial, the last step is to run

    $ eb deploy

Which gives me

    INFO: Environment update is starting.
    INFO: Deploying new version to instance(s).
    ERROR: [Instance: i-71f70593] Command failed on instance. Return code: 137 Output: (TRUNCATED)... /var/app/ondeck/public/assets/priorizations/simplified/upper-5154a5b0c3e6cbf5463df08c05ab0bb4.png
    I, [2015-09-21T23:00:17.233813 #26607]  INFO -- : Writing /var/app/ondeck/public/assets/application-ea5935c63d274c4625db69541c62d788.js
    Killed (core dumped).
    Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
    INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
    ERROR: Unsuccessful command execution on instance id(s) '*****'. Aborting the operation.
    ERROR: Failed to deploy application.

The /var/log/eb-activity.log file has nothing interesting (I think)

Can someone help me, please?

Obs: The project is fine locally and on heroku.

like image 548
Pedro Bernardes Avatar asked Oct 31 '22 18:10

Pedro Bernardes


1 Answers

I also was having the same exact error (Killed (core dumped)) during asset precompilation. Was not intermittent for me - I would consistenly get it every time.

Increasing the EC2 instance size fixed the issue for me. I suspect memory was the lacking resource - CPU at 100% during precompilation has never been a problem for me.

like image 79
deprecated Avatar answered Nov 15 '22 06:11

deprecated