~not/Pleroma

7e99d0619d02835fab66134f14dd99fb4c313d26 — Mark Felder 3 months ago 0fbec6b
Force more frequent full_sweep GC runs on the Websocket processes

Websocket processes seem to be the primary culprit for Binary memory allocation bloat.
2 files changed, 5 insertions(+), 2 deletions(-)

A changelog.d/memleak.fix
M lib/pleroma/web/endpoint.ex
A changelog.d/memleak.fix => changelog.d/memleak.fix +1 -0
@@ 0,0 1,1 @@
Fix a memory leak caused by Websocket connections that would not enter a state where a full garbage collection run could be triggered.

M lib/pleroma/web/endpoint.ex => lib/pleroma/web/endpoint.ex +4 -2
@@ 14,7 14,8 @@ defmodule Pleroma.Web.Endpoint do
    websocket: [
      path: "/",
      compress: false,
      error_handler: {Pleroma.Web.MastodonAPI.WebsocketHandler, :handle_error, []}
      error_handler: {Pleroma.Web.MastodonAPI.WebsocketHandler, :handle_error, []},
      fullsweep_after: 20
    ]
  )



@@ 27,7 28,8 @@ defmodule Pleroma.Web.Endpoint do
      ],
      timeout: 60_000,
      transport_log: false,
      compress: false
      compress: false,
      fullsweep_after: 20
    ],
    longpoll: false
  )