OOM errors on free tier on a bare application.

Hi, I have intermittently been running into an issue where I would get an Out of memory error and a page request would fail.

I am using the free tier, I am the only user of the app right now. It is a barebones app. I have only done CSS styling with tailwind and phx_gen_auth.

the OOM errors happen when I try to register, or sign in, and seems to happen intermittently. I first noticed it last night, but this morning they did not happen. Now in the afternoon they are.

2021-09-23T18:37:02.792095601Z app[d701ee37] ewr [info] [ 2440.770057] Out of memory: Killed process 510 (beam.smp) total-vm:1371652kB, anon-rss:170612kB, file-rss:12kB, shmem-rss:76312kB, UID:65534 pgtables:684kB oom_score_adj:0
2021-09-23T18:37:02.802725054Z proxy[d701ee37] lga [error] error.code=2003 error.message="App connection closed before request/response completed" request.method="POST" request.url="/users/log_in" request.id="01FG9Z4PRDQZH5DWKA37Q79Z6Z" response.status=502

The simplest thing to do is add memory and see if they go away. That error message is saying beam used >1GB of memory (probably including swap). Elixir can be memory efficient, but the 256MB included in our free tier is cutting it close and using those VMs with an Elixir app takes some optimization.