Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Apparent memory leak with use_presence option #12053

@hyossing

Description

@hyossing

Hello,

Description

GC(Garbage Collection) time increases unbounded for specific config in homeserver.yaml.

use_presence: False

Our running synapse's homeserver.yaml is quite old, so we just keep the use_presence options.
Then,

Screen Shot 2022-02-22 at 7 08 10 AM

In my opinion, the gc time increase more as requests are increases.

It is not easy to catch the problem, because It is a kind of aging issue.

  • Restarting synapse solve the problem because leaked memory is gone.

So, it took a time to know about it.

If we set the settings to the latest, then the unbounded increase is not appear anymore.

# Presence tracking allows users to see the state (e.g online/offline)
# of other local and remote users.
#
presence:
  # Uncomment to disable presence tracking on this homeserver. This option
  # replaces the previous top-level 'use_presence' option.
  #
  # enabled: false

  # Presence routers are third-party modules that can specify additional logic
  # to where presence updates from users are routed.
  #
  presence_router:
    # The custom module's class. Uncomment to use a custom presence router module.
    #
    #module: "my_custom_router.PresenceRouter"

    # Configuration options of the custom module. Refer to your module's
    # documentation for available options.
    #
    #config:
    #  example_option: 'something'

Steps to reproduce

Archive.zip

  1. unzip
  2. yarn install

  3. docker-compose up -d

  4. create postgresql database
  • CREATE DATABASE synapse ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0
  1. access grafana - http://localhost:3000
  2. import synapse dashboard and check it does work. - synapse_rev1.json
  3. node synapse-gc-test.js

  • Run the script one or two days, then check the GC time increase.

Thanks you.
Hyosung

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-MinorBlocks non-critical functionality, workarounds exist.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions