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

Goroutine sustained growth #275

Open
liliang8858 opened this issue Sep 1, 2021 · 1 comment
Open

Goroutine sustained growth #275

liliang8858 opened this issue Sep 1, 2021 · 1 comment
Labels
question Further information is requested

Comments

@liliang8858
Copy link

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

curl http://127.0.0.1:8000/debug/pprof/goroutine?debug=1
goroutine profile: total 52019
21104 @ 0x43ab85 0x4059fa 0x405755 0x8061b8 0x80a5a4 0x80ad36 0x470c61
#       0x8061b7        github.com/influxdata/influxdb-client-go/v2/api.(*WriteAPIImpl).WriteRecord+0xb7        F:/go/pkg/mod/github.com/influxdata/influxdb-client-go/[email protected]/api/write.go:231

Expected behavior:
How to reduce Goroutine

Actual behavior:
Goroutine sustained growth

Specifications:

  • Client Version:v2.5.0
  • InfluxDB Version:v2.5.0
  • Platform:linux
@vlastahajek
Copy link
Contributor

@liliang8858, this library creates itself only two internal goroutines.
It seems there are many goroutines using WriteRecord in the test app. How many?

There is a main goroutine sending data to a server using a single connection. If this goroutine does not manage to send data quickly other routines must wait. You have to balance the number of writing goroutines.

You can use multiple clients to write using multiple connections.

@vlastahajek vlastahajek added the question Further information is requested label Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants