electric-sql / electric

Local-first sync layer for web and mobile apps. Build reactive, realtime, local-first apps directly on Postgres.
https://electric-sql.com
Apache License 2.0
5.37k stars 124 forks source link

fix(electric): Limit the number of Erlang ports at startup #1367

Closed alco closed 2 weeks ago

alco commented 2 weeks ago

As explained in the newly added rel/vm.args.eex file, not doing this may lead to excessive memory usage of BEAM's OS process.

Specific comment on the Elixir Forum confirming that trying to limit the Docker container memory causes beam to get killed with an OOM error without this fix - https://elixirforum.com/t/elixir-erlang-docker-containers-ram-usage-on-different-oss-kernels/57251/15.