?
Ghost crashes when importing
»
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
- To resolve this issue using
ghost-cli,cdinto your installation directory and runnode --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. - Import your content like normal and the import should complete, assuming you have enough RAM.
- 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.