'java.lang.OutOfMemoryError when trying to import firestore into emulator

I'm having some serious issues understanding why the emulator won't import the exported firestore data I am feeding it. It keeps throwing a memory error. Any help/ideas?

These are the logs given by firestore-debug.log when trying to run command: firebase emulators:start --import=./production_data_export

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.nio.HeapByteBuffer.<init>(Unknown Source)
    at java.nio.ByteBuffer.allocate(Unknown Source)
    at com.google.cloud.datastore.emulator.impl.LevelDBLogReaderChannel.readRecord(LevelDBLogReaderChannel.java:84)
    at com.google.cloud.datastore.emulator.impl.LevelDBLogReaderChannel.readProtoMessage(LevelDBLogReaderChannel.java:63)
    at com.google.cloud.datastore.emulator.impl.ExportImportUtil.parseEntityProtoFile(ExportImportUtil.java:194)
    at com.google.cloud.datastore.emulator.impl.ExportImportUtil.fetchEntities(ExportImportUtil.java:66)
    at com.google.cloud.datastore.emulator.firestore.CloudFirestore.main(CloudFirestore.java:90)

folder structure of production_data_export

code for firebase-export-metadata.json

{
  "version": "10.2.0",
  "firestore": {
    "version": "1.13.1",
    "path": "",
    "metadata_file": "mock-db.overall_export_metadata"
  }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source