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

write tcp . write: broken pipe issue while producing #2004

Closed
anjulapaulus opened this issue Sep 2, 2021 · 4 comments
Closed

write tcp . write: broken pipe issue while producing #2004

anjulapaulus opened this issue Sep 2, 2021 · 4 comments

Comments

@anjulapaulus
Copy link

anjulapaulus commented Sep 2, 2021

Versions

Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.

Sarama Kafka Go
1.29.1 v2.0.0 1.15.6
Configuration

What configuration values are you using for Sarama and Kafka?

        conf := sarama.NewConfig()
	conf.ClientID = fmt.Sprintf(`%s-%s`, config.Id, `simple-consumer`)
	conf.Version = sarama.V2_0_0_0
	conf.Producer.RequiredAcks = -1 //Wait for all
	conf.Producer.Return.Errors = true
	conf.Producer.Return.Successes = true
	conf.Producer.Idempotent = false
	conf.Net.MaxOpenRequests = 1
	conf.Producer.Compression = sarama.CompressionSnappy
	conf.Producer.Partitioner = sarama.NewHashPartitioner

	conf.Producer.Retry.Max = config.Retry
	conf.Producer.Retry.Backoff = config.RetryBackOff

These are the only configurations we hold in the library and rest we use the defaults.

Logs
logs: CLICK ME

write tcp 127.0.0.1:9092: write: broken pipe

Problem Description

I am encountering a write tcp broken pipe error while producing to kafka in one of our services. We have a wrapper library for sarama that we use for our services. We had an upgrade done on sarama versions recently from 1.20.0 to 1.29.1 and it was working fine in our development environment. After keeping it in for days we started encountering problems producing due the write broken pipe issues on that service which we had the upgrade of the version with the changes done. Mind that we only changed the sarama version but our services with the older versions worked without any issues. Could I get a clarification on why it happens with the service that the sarama version upgrade was done? Sorry I can only provide the following line without the broker IP.

@anjulapaulus
Copy link
Author

anjulapaulus commented Sep 2, 2021

@varun06 @dnwe Could you have a look and inform me if any changes are needed?

@varun06
Copy link
Contributor

varun06 commented Sep 3, 2021

I see another issue related to this -> #1565

@anjulapaulus
Copy link
Author

@varun06 The issue was sorted. The producer retries were set to 0 by our library. We cannot always mitigate the chances of having a tcp timeout but having retries set could solve it to some extent.

@varun06
Copy link
Contributor

varun06 commented Sep 4, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants