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

Huge memory consumption in v2 #57

@Axel29

Description

@Axel29

Preconditions (*)

  1. Version 2.x

Steps to reproduce (*)

  1. Instanciate a \Storyblok\Client object
  2. Call the "resolveLinks" method with the "story" parameter passed to it
  3. Call the "resolveRelations" method and add some relations to the client
  4. Call the "getStoryByUuid" method to fetch a story by its UUID
  5. Watch your RAM while the whole process is running

Expected result (*)

  1. The query is made with no issue and the RAM isn't consumed more than it should

Actual result (*)

  1. The RAM decreases until it is completely consumed by the process
  2. The process gets killed

Explanation

The bug seems to have appeared in the commit #adb52f212e5f3ff38457ea4c7781a85f9f99e460 after adding the calls to the enrichStory method in the responseHandler method.

When I put a dump() in the enrichContent method, it parses way more data than when the resolveRelations method isn't called.

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