Steps you can take depend on the technology (php, ruby, java, python, nodejs, golang etc) of the given site. You can monitor processes live via SSH, for example, using the command: top -a. The RAM usage by a specific process can be seen in the RES column.