Akash Shah
Akash Shah

Reputation: 147

Assets compile failed with out of memory and not able to ssh into server now

I'm using Amazon instance to to run my Ubuntu server, i depyoed new feature and did

rake assets:precompile RAILS_ENV=staging

but i got error while pre-compiling

Allocation failed - process out of memory precompile

I found out that my CUP usage was 100%. I exit that proecess. But now i'm not able to SSH in to my server. The instance on AWS is running state. it says ssh_exchange_identification: read: Connection reset by peer

Upvotes: 1

Views: 392

Answers (1)

Akash Shah
Akash Shah

Reputation: 147

Ok, It turned out I was running multiple process like sidekiq, rails console and my error logs in other terminal. So it drained a lot of RAM memory that time.This is why the server stopped responding.

I restated the Instance so i was able to log in to the SSH and then only ran precompaile and it worked. Still the memory usage was around 95% but other processes were close that time,so the precompailatoin ran successfully.

I'm using this server just as staging/testing server before production so there is no point of increasing memory(As of now). SO the above solution worked for me. Hope this might come in hand for you guys.

Upvotes: 1

Related Questions