I’m running a Node.js application that fetches Google business reviews using the Google Places API. When I try to deploy the application in AWS ECS (Elastic Container Service), my container gets continuously killed, showing the following error:
Exit code: 137 OutOfMemoryError: Container killed due to memory usage`
Here are the container specifications:
- 1 vCPU
- 2 GB memory
Despite these resources, the container runs out of memory. The memory usage seems to spike when the app fetches reviews from the API.
I’ve tried increasing the container’s memory limit from 2gb to 4gb it works . Its simple call gonna trigger every 24 hrs to fetch new review . Could anyone help me understand the reason behind this memory consumption and how to prevent the container from being killed?
Reason behind the reviews API causing OOM issue .