Very high memory usage #2799
-
My
My
I don't know how to debug this.. And this is not a memory leak. When I restart the containers, the memory usage increases to 1.7 GB in just a few seconds. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 19 replies
-
👋 @cjc7373 Could please you try using something like $ cd hosting
$ docker compose exec -ti plausible bin/plausible remote iex> :recon.proc_count(:memory, 10) It would list ten processes using the most memory. iex> :erlang.memory()
[
total: 212253376, # ~212MB (on my instance)
processes: 50356216,
processes_used: 50354816,
system: 161897160,
atom: 1876329,
atom_used: 1857201,
binary: 16783616,
code: 56482918,
ets: 65957320
] This would give a breakdown of total memory usage. |
Beta Was this translation helpful? Give feedback.
-
I'm having the same issue. Plausible immediately uses 1.8GiB of memory on startup which seems quite high considering the app is pretty much idle (~140 visitors since installation yesterday). I'm wondering if this is to be expected as I don't have any experience with Elixier apps.
Unfortunately I can't provide any more information (besides the system beeing a ARM64 VPS) because |
Beta Was this translation helpful? Give feedback.
-
There was a discussion on Elixir forum recently about similarly high memory usage: https://elixirforum.com/t/elixir-erlang-docker-containers-ram-usage-on-different-oss-kernels/57251 It'd be great if you guys could try out the suggestions from that thread and report on the results. I haven't been able to reproduce the problem on AWS unfortunately. |
Beta Was this translation helpful? Give feedback.
Setting
ERL_MAX_PORTS=1024
as suggested in this thread did the trick. Memory usage jumps to ~500MiB on startup and then settles at ~370MiB.PS: Looks like the default ulimit in Docker containers (on my systems) is 1073741816 no matter what the system default is set to. Will need to investigate this further.