Elixir/Docker app takes 2Go of RAM

Hi,

I work on Elixir Phoenix app with Docker, and I have a lot of Out of Memory crashes.
I check the memory used by my containers and i discovered that my app used too much memory, as below :

The first one is an image test, and the second one is my app.

I’m on a Arch Linux distro, Endeavouros, and my laptop has 8Go of RAM.

Anyone with the same problem and a solution for that ?

I’ve had success with this environment variable in the past (given in Compose format):

services:
  phoenix:
    environment:
      ERL_MAX_PORTS: 1024  # Fixes excessive RAM usage on some systems

Here’s a thread with more info:

1 Like

Thank you !
I’ve already checked the OPEN_MAX env var and as the value was 1024, i thought it was ok, but it wasn’t.
I put the ERL_MAX_PORTS env var in my project and it’s ok ! :+1: :grin:

2 Likes