For some reason, when doing a grunt build
on my VM, it simply dies off in this way:
...
Running \"concurrent:dist\" (concurrent) task
Killed
So, I just ran into this problem as well, and I believe it has to do, with as you suspect, the VM running out of memory (are you using a $5 Digital Ocean box too?). The concurrent process attempts to run compass, copy, imagemin, svgmin and html all at the same time, which probably causes the issue, so in my build, I just comment out the concurrent rule, and inserted the individual processes in below and it seems to complete. A little slower, but thats the cost of being a cheapskate :)
grunt.registerTask('build', [
'clean:dist',
'useminPrepare',
//'concurrent:dist',
'compass',
'copy:styles',
'imagemin',
'svgmin',
'htmlmin',
'autoprefixer',
'concat',
'cssmin',
'uglify',
'modernizr',
'copy:dist',
'rev',
'usemin'
]);