You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have implemented a single Kafka producer using Sarama, which multiple goroutines utilize to produce messages to Kafka. However, we have observed an excessive number of goroutines in the gopark state. What could be the possible cause for this?
Below is the image of goroutine dump:
Versions
Sarama
Kafka
Go
v1.40.1
2.8.1
1.18
The text was updated successfully, but these errors were encountered:
So from the displayed goroutine image it looks fairly normal. Your producer is writing to one or more topics totalling 2093 partitions. Sarama dedicates a parititionProducer to each partition. Each of these has a dispatch() loop which is waiting on an input channel to receive messages that you'd like it to send. When that input channel is empty they will block on the chanrecv waiting for input and the Go scheduler will park the goroutine until it needs to be woken when the channel receives input.
Description
We have implemented a single Kafka producer using Sarama, which multiple goroutines utilize to produce messages to Kafka. However, we have observed an excessive number of goroutines in the gopark state. What could be the possible cause for this?
Below is the image of goroutine dump:
Versions
The text was updated successfully, but these errors were encountered: