serverless-appsync-simulator icon indicating copy to clipboard operation
serverless-appsync-simulator copied to clipboard

High RAM Usage ~ 16GB

Open Lschulzes opened this issue 2 years ago • 1 comments

Describe the bug I suppose it is bug, or is just the way it is, but when I run my project, it consumes about 22GB of ram, which is insanely high. I already inspected dynamodb-local an it is responsible for 6GB, so sls-offline + appsync-simulator gives 16GB. Which makes it not viable for some devs of my team to work on.

To Reproduce My project is not opensource, but it does have about 200 lambdas and 200 resolvers. It also counts with 50 tables

Expected behavior To not consume so much memory

Screenshots If applicable, add screenshots to help explain your problem.

Additional context I want to understand if that is expected for the dimension of my project, or if someone has a project of similar size that consumes less RAM

Lschulzes avatar Feb 08 '23 17:02 Lschulzes

Currently investigating an issue where if I upgrade serverless-appsync-simulator from 0.19.6 to 0.20.0 that GitLab CI job will fail with "Error: The service was stopped" And some stacktrace to esbuild. Online first clue was OOM, so might be related but not sure, Will further investigate if it is because of OOM from this module

Update: For me it was either CPU or memory, by reducing the amount of Lambda / appsync resolvers in my serverless.yml it worked. My fix was now to increase the memory and CPU of our GitLab runner so the server could start without throwing the "The server was stopped" error.

twixr avatar Feb 21 '23 20:02 twixr