Skip to content

Memory leak when upgrading from Parse Server 6.5.11 to Parse Server 7.5.2 #9813

Open
@Stovedal

Description

@Stovedal

Hello!

New Issue Checklist

Issue Description

After upgrading from Parse Server 6.5.11 and JS SDK 4.2.0 to Parse Server 7.5.2 and JS SDK 5.3.0, I observed a consistent increase in memory usage over time in our production environment. Heap snapshots revealed that the memory was increasingly filled with what looks like schema related objects, primarily related to the GQL schema.

After adjusting the schemaCacheTtl from 60 to 86400 seconds the memory buildup stopped.

This suggests there might be a memory leak with the GraphQL schema caching in this newer version.

Steps to reproduce

The problem proved difficult to reproduce in a dev environment. I attempted running loads of queries with autocannon locally against the server but saw little increases in memory then. However when it was live in production memory steadily increased every time we released it. I suspect the issue could be bigger in production over dev by the sheer different kinds of requests we're doing, as I only blasted a few different queries in dev.

Here the spike is visible when having this release out between 11.00 and 12.00 with TTL of 60 seconds, and the same release out after 4 pm with the TTL set to 86400.

Image

Actual Outcome

Steady increase of memory usage, primarly filled with schema related objects.

Expected Outcome

Stable memory usage.

Environment

Server

  • Parse Server version: 7.5.2
  • Operating system: Linux
  • Local or remote host: Heroku

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 6.0.0
  • Local or remote host: MongoDB Atlas

Client

  • SDK: Javascript
  • SDK version: 5.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions