terraform-provider-kafka-connect icon indicating copy to clipboard operation
terraform-provider-kafka-connect copied to clipboard

terraform plan on connectors taking long time and throwing error - context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Open SumanRamakrishna opened this issue 3 years ago • 3 comments

Hi,

Terraform plan was working fine when we add few number of connectors created thru terraform. But when I tried to deploy more number of connectors like above 160, its taking too much time to run plan on the state file and getting the below error.

│ Error: Get "https://example.com:8083/connectors/example_connector": context deadline exceeded (Client.Timeout exceeded while awaiting headers) │

Is there any workaround for this?

SumanRamakrishna avatar Jun 27 '22 13:06 SumanRamakrishna

we are seeing the same. +1

sameer2800 avatar Jul 07 '22 05:07 sameer2800

I can quite reliably reproduce this problem with version 0.2.4 of this Provider and switching back to 0.2.3 works fine again. Perhaps it is due to the upgrade to Go 1.16? I'm not familiar with Go, but I took a poke around and I can see that the low-level "Resty" library allows you to set a timeout, but the Kafka Connect client being used ("go-kafka-connect") sets a hardcoded limit of 10 seconds. For whatever reason my Kafka Connect endpoint takes 20 seconds to return details of a specific connector, although it is quick to return a list of Connectors for example - it is only the details that is slow.

patrickherrera avatar Aug 22 '22 10:08 patrickherrera