Rebake aborts with error message

This.
When your server runs out of (virtual) memory, the operating system starts killing processes to make sure that the system does not become entirely unavailable.

Since this is only happening during a rebake, you might not need more actual memory, just more virtual memory, which can be accomplished by enlarging your swap file.