Ghost may run into issues when importing a large amount of data. This means you need to run Ghost with more memory allocated to it.

Error message:

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

  1. To resolve this issue using ghost-cli, cd into your installation directory and run node --max_old_space_size=4096 --optimize_for_size --max_executable_size=4096 --stack_size=4096 current/index.js.

    This will run ghost in the foreground and log all of the requests that are made to it.
  2. Import your content like normal and the import should complete, assuming you have enough RAM.
  3. Once the import completes, terminate the ghost instance (ctrl+c in the terminal window) and start ghost normally (ghost start).

For non-supported custom installs of Ghost, adjust accordingly to allocate more memory or visit the forum.