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

Why does the pprof analysis show that github.com/IBM/sarama.(*partitionProducer).dispatch has a large number of coroutines enabled and suspended #2980

Open
Aliuyanfeng opened this issue Sep 10, 2024 · 2 comments
Labels
stale Issues and pull requests without any recent activity

Comments

@Aliuyanfeng
Copy link

Description

as shown below,I am in the process of producing messages and find that a large number of coroutines are started

image

Versions
Sarama Kafka Go
v1.43.2 V2_5_0_0 1.20
Configuration
func (p *KFKPool) newConnection() (sarama.SyncProducer, error) {
	config := sarama.NewConfig()
	config.Version = sarama.V2_5_0_0
	config.Producer.RequiredAcks = sarama.WaitForLocal
	config.Producer.Partitioner = sarama.NewRandomPartitioner
	config.Producer.Return.Successes = true
	config.Producer.Timeout = time.Second * 5
	config.Producer.Retry.Max = 0
	config.Net.WriteTimeout = time.Second * 3
	client, err := sarama.NewSyncProducer([]string{p.host}, config)
	if err != nil {
		return nil, err
	}
	return client, nil
}

Looking forward to receiving your reply, thank you!🤣

@puellanivis
Copy link
Contributor

This is expected. There’s quite a few different goroutines that get started per partition. If you have enough partitions, then this number can explode pretty fast. However, most of them are parked at any given time, so their impact on performance is minimal.

Copy link

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur.
Please check if the main branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

@github-actions github-actions bot added the stale Issues and pull requests without any recent activity label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues and pull requests without any recent activity
Projects
None yet
Development

No branches or pull requests

2 participants