Closed rickwaugh1 closed 5 years ago
So here's the problem. As it stands, the args passed in in that array are placed at the end of the java command. But those needed to alter the heap size need to come immediately after the java command.
This does not work: java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -port 8000 -sharedDb -Xms1024m -Xmx2048m
This works: java -Xms1024m -Xmx2048m -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -port 8000 -sharedDb
@rickwaugh1 My PR resolves this problem.
Until it gets merged, you can use my fork.
npm install nmors/dynamodb-local#add-support-for-java-options
await DynamoDbLocal.launch(
8000,
null,
[],
true,
true,
'-Xms1024m -Xmx2048m'
);
I'm running out of memory running dynamoDB locally. I have been trying to increase the heap size on startup, like this:
DynamoDbLocal.launch(8000, null, ['-sharedDb','-Xms4096m','-Xmx8192m'])
But either I'm using a ridiculous amount of memory, or it's not working. Should the above work?