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

Context Deadline Exceeded: Client.Timeout or Context Cancellation while Reading body #1392

Closed
5 of 6 tasks
SiddhantAgarwal17 opened this issue Jul 16, 2021 · 5 comments
Closed
5 of 6 tasks
Labels

Comments

@SiddhantAgarwal17
Copy link

SiddhantAgarwal17 commented Jul 16, 2021

Hi there,

Thank you for opening an issue. In order to better assist you with your issue, we kindly ask to follow the template format and instructions. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests only. General usage questions submitted as issues will be closed and redirected to New Relic's Explorers Hub https://discuss.newrelic.com/c/build-on-new-relic/developer-toolkit.

Please include the following with your bug report

⚠️ Important: Failure to include the following, such as omitting the Terraform configuration in question, may delay resolving the issue.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

Affected Resource(s)

Please list the resources as a list, for example:

  • newrelic_alert_policy
  • newrelic_alert_channel
  • newrelic_alert_policy_channel
  • newrelic_alert_condition

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration

Please include your provider configuration (sensitive details redacted) as well as the configuration of the resources and/or data sources related to the bug report.

provider "newrelic" {
  version    = "2.19.1"
  api_key    = var.api_key
  account_id = var.account_id
}
  • We store the state in S3

Actual Behavior

With high number of resources, we are running into Error: context deadline exceeded (Client.Timeout or context cancellation while reading body) error. This has been happening consistently since last 2 days. Initially, we thought that probably the network speed was an issue. But the network under which we ran has current download/upload speed in the range of ~40-50mbps

Expected Behavior

The resource should be created even if the number of resource which need to be created are high without the client timing out.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform plan

Debug Output

module.alert_policies.newrelic_alert_condition.alert_conditions["ml-direct-messaging_heap_memory_usage"]: Refreshing state... [id=933846:15389141]
module.alert_policies.newrelic_alert_condition.alert_conditions["ml-patient-list-mgmt_heap_memory_usage"]: Refreshing state... [id=934088:15389000]
module.alert_policies.newrelic_alert_condition.alert_conditions["ml-clinical-device-values_heap_memory_usage"]: Refreshing state... [id=983604:15619846]
module.alert_policies.newrelic_alert_condition.alert_conditions["ml-health-concern_heap_memory_usage"]: Refreshing state... [id=934062:15388902]
module.alert_policies.newrelic_alert_condition.alert_conditions["ml-blood-loss-measurement_heap_memory_usage"]: Refreshing state... [id=959176:15506192]
module.alert_policies.newrelic_alert_condition.alert_conditions["ml-patient-opioid-use-disorder-prediction_heap_memory_usage"]: Refreshing state... [id=1136121:16507264]

Error: context deadline exceeded (Client.Timeout or context cancellation while reading body)

Error: context deadline exceeded (Client.Timeout or context cancellation while reading body)

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
hashicorp/terraform-provider-azurerm#8456

Similar issue was reported for Azure provider.

@SiddhantAgarwal17
Copy link
Author

So, I tried something today. I ran plan but without referring to the state stored in S3. So, it basically thinks everything needs to be created the first time. It successfully generated the plan for me this time around. I'm thinking probably its an issue while connecting to S3 which could be slow because I'm located in India and the S3 bucked is in the us-west-2 region. This may be the reason the client eventually times out. Any suggestions?

@SiddhantAgarwal17
Copy link
Author

Another update. I ran the whole thing with S3 configured on a machine that's in US. Though it takes a bit of time but it doesn't timeout. Is this something that can be handled?

@stale
Copy link

stale bot commented Aug 3, 2021

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Aug 3, 2021
@stale
Copy link

stale bot commented Aug 11, 2021

This issue has been automatically closed due to a lack of activity for an extended period of time.

@stale stale bot closed this as completed Aug 11, 2021
@kidk kidk reopened this Oct 7, 2021
@kidk kidk removed the stale label Oct 7, 2021
@kidk
Copy link
Contributor

kidk commented Mar 9, 2022

Hi @SiddhantAgarwal17 sorry for the delayed response.

Are you still seeing this issue?

@kidk kidk added bug Something isn't working waiting-response labels Mar 9, 2022
@kidk kidk closed this as completed Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants