Skip to content

Router OOMsΒ #8381

@montykamath

Description

@montykamath

Describe the bug

When you execute the query (see query.graphql), the query always times out.
If you execute the query in parallel about 4 or 5 times, it will grow router memory until router OOMs. On my laptop memory consumption grows to >250 GB and then crashes.

The query is:

query Feed {
  postInterface1(id: "") {
    __typename
    feed {
      ...relatedPostFragment
      ... on Recommendation {
        postInterface1 {
          ...relatedPostFragment
        }
      }
    }
  }
}

fragment crosspostFragment on PostInterface2 {
  crosspost {
    postInterface1 {
      ... on PostInterface2 {
        __typename
        gallery {
          __typename
          items {
            __typename
            id
            name
          }
        }
      }
    }
  }
}

fragment relatedPostFragment on PostInterface1 {
  __typename
  ... on PostInterface2 {
    ...crosspostFragment
  }
}

To Reproduce

Steps to reproduce the behavior:

  1. Clone this repo: https://github.com/montykamath/apollo-router-ir-20708-oom
  2. See the readme for stalling router and rover
  3. Compose the supergraph with make supergraph
  4. Run the service with make run
  5. Execute the query in query.graphql (also above)

Expected behavior

The query should execute and complete but it does not.

Output

When you execute the query (see query.graphql), the query always times out.
If you execute the query in parallel about 4 or 5 times, it will grow router memory until router OOMs. On my laptop memory consumption grows to >250 GB and then crashes.

Desktop (please complete the following information):

  • OS: Mac OS
  • Version Tahoe 26.0.1

Additional context

NA

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions