When you see Out of memory issues (OOM killed) it could mean that either:
- Your app needs more memory - increase your plan and add more memory to the container
- the app is memory hungry - optimize your code
Hence the OOM killer from the OS is killing it when your app takes more than the amount of configured RAM + over-commit. Here over-commit is the amount of RAM that the automation allows your app to take if the underlying host has RAM left to spare.
To diagnose this issue you can check the access logs to see how much KB each requests take. For example if your app is php then you could login to the app container and see which URL took memory by executing the following command
cat /var/log/php.access.log | grep -Fa "$(date +%Y-%m-%d)" | sort -n -k 4|tail -n 25 wc -l
We also suggest to check the performance tuning Documentation.
Alternatively you could use a profiler/debugger like Blackfire