99designs / 99designs/gqlgen

No restriction on firing goroutines.

Open
#2,704 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
10.8k
Forks
1.3k
Avg merge
2d 36m
Merged PRs (30d)
26

Description

### What happened?
On load testing my server with 2000 requests , i generted a pprof trace and turns out over 6,00,000 goroutines were fired during the span. The request endpoint was pretty simple and CPU bound, on firing so many goroutines, they are competing for resource and most of time is getting spend on context switching.
### What did you expect?
There should be a finite version gorountes via worker pool
![Screenshot 2023-07-03 at 10 09 04](https://github.com/99designs/gqlgen/assets/42290488/38b21088-3353-459d-a367-9c9229bbf3e4)

### Minimal graphql.schema and models to reproduce
an array of type Content {
k: String!
v: String!
}

type ExternalReference {
id: Int!
source: String!
}

### versions
- `go run github.com/99designs/gqlgen version`?
- github.com/99designs/gqlgen v0.17.20
- `go version`? go1.19.3
-

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.