graphql / graphql/graphiql

[lsp-server] 🐞 Heap out of memory

Open
#3,869 2 comments 0 reactions 0 assignees View on GitHub
bug lsp-server
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Current Behavior

In our big project, we are constantly seeing crashes like this:

```
<--- Last few GCs --->

[3450436:0x18d8000e8000] 6166 ms: Mark-Compact (reduce) 2853.2 (2882.3) -> 2853.2 (2875.3) MB, pooled: 0 MB, 50.26 / 0.00 ms (average mu = 0.615, current mu = 0.260) last resort; GC in old space requested
[3450436:0x18d8000e8000] 6220 ms: Mark-Compact (reduce) 2853.2 (2875.3) -> 2853.2 (2875.3) MB, pooled: 0 MB, 53.84 / 0.00 ms (average mu = 0.414, current mu = 0.001) last resort; GC in old space requested

<--- JS stacktrace --->

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

[Error - 09:51:48] The vscode-graphql server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Info - 09:51:48] The graphql server has stopped running
```

Any ideas / solutions for this?

### Expected Behavior

Should not crash or at least show a graceful error message

### Steps To Reproduce

Run VSCode with a big project

### Environment

* LSP Server Version: 0.13.0 (2025-02-19, 18:23:00)
* OS: Ubuntu 24.04
* LSP Client: VSCode v1.97.2

### Anything else?

Happens on a similar system with the same projects for a colleague as well.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.