Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parallel ingest when guacgql is in docker. #900

Merged
merged 1 commit into from May 31, 2023

Conversation

jeffmendoza
Copy link
Collaborator

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

  • All commits have a Developer Certificate of Origin (DCO) -- they are generated using -s flag to git commit.
  • All new changes are covered by tests
  • If GraphQL schema is changed, make generate has been run
  • If collectsub protobuf has been changed, make proto has been run
  • All CI checks are passing (tests and formatting)
  • All dependent PRs have already been merged

Signed-off-by: Jeff Mendoza <jlm@jlm.name>
Copy link
Collaborator

@pxp928 pxp928 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kodiakhq kodiakhq bot merged commit 08bbd69 into guacsec:main May 31, 2023
8 checks passed
rmetzman pushed a commit to rmetzman/guac that referenced this pull request Jun 5, 2023
Signed-off-by: Jeff Mendoza <jlm@jlm.name>
rmetzman pushed a commit to rmetzman/guac that referenced this pull request Jun 5, 2023
Signed-off-by: Jeff Mendoza <jlm@jlm.name>
Signed-off-by: Rebecca Metzman <rmetzman@google.com>
rmetzman pushed a commit to rmetzman/guac that referenced this pull request Jun 8, 2023
Signed-off-by: Jeff Mendoza <jlm@jlm.name>
Signed-off-by: Rebecca Metzman <rmetzman@google.com>
mlieberman85 pushed a commit to mlieberman85/artifact-ff that referenced this pull request Jul 5, 2023
Signed-off-by: Jeff Mendoza <jlm@jlm.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants