Skip to content

Freedomains.dev server running out of memory #411

Description

@SlyBouhafs

Our freedomains server is experiencing memory issues that are causing significant disruptions in our application's performance, impacting our users. The server's memory usage spikes and remains elevated, and we suspect a potential memory leak in some JS libraries, particularly tesseract.js.

We have implemented a temporary solution by adding some swap memory to free up RAM memory, allowing the server to continue functioning. However, we need to identify the root cause of the issue and implement a permanent solution to prevent it from recurring.

One proposed solution is to limit docker instances memory by updating the createContainer function in myProxy/src/helpers/docker.ts. We recommend adding a new parameter to the options that includes HostConfig with a Memory of 1024m.

const createContainer = async (

"HostConfig": {
  "Memory": 1024m, 
}

Another solution is to free up more space by killing some of the old apps running.

Additionally, we need to investigate the myProxy code to determine why old apps are not being removed from the server.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions