Fix parallel ingest when guacgql is in docker. #900
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Parallel ingest is failing half way through when running guacgql in docker. Works fine when running directly, or in k8s with the helm chart. This suggests a resource limitation in the docker networking setup.
Taking a look at the default Go client networking setup, it tries to re-use connections, but limits the number of idle connections per sever to 2. We are trying to do around 20, so they are constantly being closed and re-opened, since we only allow 2 to sit idle.
Bumping the number of idle connections allowed per server fixes the issue for me.
https://pkg.go.dev/net/http#DefaultTransport
https://pkg.go.dev/net/http#Transport
https://pkg.go.dev/net/http#pkg-constants (see DefaultMaxIdleConnsPerHost)
PR Checklist
-s
flag togit commit
.make generate
has been runcollectsub
protobuf has been changed,make proto
has been run