-
Notifications
You must be signed in to change notification settings - Fork 354
Description
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
- 1. The issue provides a reproduction available on
Github,
Stackblitz
or
CodeSandbox
Make sure to fork this template and run
yarn generatein the terminal.Please make sure Mesh package versions under
package.jsonmatches yours.
- 2. A failing test has been provided
- 3. A local solution has been provided
- 4. A pull request is pending review
Describe the bug
The execute function provided by the configured and created mesh leaks memory.
To Reproduce Steps to reproduce the behavior:
Clone the repo https://github.com/angelsvirkov/graphql-mesh-execute-leak and follow the readme steps to inspect the memory.
Expected behavior
The memory stays stable up to some reasonable margins and does not continuously leak.
Environment:
-
OS: I believe it does not matter
-
@graphql-mesh/...:
"@graphql-mesh/config": "0.108.7",
"@graphql-mesh/openapi": "0.109.10",
"@graphql-mesh/runtime": "0.106.6",
- NodeJS: I believe it does not matter as long as mesh can run
Additional context
I have been battling this issue for over a week and I cannot seem to identify its direct cause. In my setup I use graphql mesh in a programmatic way in a custom server. Here are a few things which I noticed along my investigation:
- There seemed to be a small memory leak in older versions as well
- The leak in our case become much stronger after we switched from version
"@graphql-mesh/[email protected]"to"@graphql-mesh/[email protected]"(envelop/core got upgraded to v5 and a few other packages were major
updated)
- When trying to isolate a ready-made example I saw that the leak was also bigger if we have additional
openapisources even if they are not used. - I have also tried using the
mesh clitobuilda mesh and then import theexecutefrom there so that just in case I didn't miss any abstraction along the way. Nevertheless, the leak was still there