Skip to content

Conversation

edgurgel
Copy link
Member

@edgurgel edgurgel commented Oct 7, 2025

Changes:

  • Set max_heap_size the same as the websocket transport
  • Set fullsweep_after the same as the websocket transport

From Erlang docs:

A few cases when it can be useful to change fullsweep_after:

  • If binaries that are no longer used are to be thrown away as soon as possible. (Set Number to zero.)

  • A process that mostly have short-lived data is fullsweeped seldom or never, that is, the old heap contains mostly garbage. To ensure a fullsweep occasionally, set Number to a suitable value, such as 10 or 20.

  • In embedded systems with a limited amount of RAM and no virtual memory, you might want to preserve memory by setting Number to zero. (The value can be set globally, see erlang:system_flag/2.)

RealtimeChannel and the websocket transport match the second bullet point as the data is usually sent and received but not kept around.

@edgurgel edgurgel closed this Oct 7, 2025
@coveralls
Copy link

coveralls commented Oct 7, 2025

Coverage Status

coverage: 85.507% (+0.2%) from 85.287%
when pulling 339c20d on fix/max-heap-size-part-2
into d5658ad on main.

@edgurgel edgurgel reopened this Oct 7, 2025
@edgurgel edgurgel force-pushed the fix/max-heap-size-part-2 branch from 2e97cc2 to 339c20d Compare October 8, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants