500 response returned: Internal Server Error

Hi team ,

We are seeing a lot of 500 Internal Server errors reported by New Relic when configuring alerts using terraform for 250+ applications (APM).

How to avoid those error? What would be the reason for getting 500 internal error responses frequently?

Any help would be greatly appreciated.

Hey @madhura.d

Can you share exactly how you are trying to configure these alerts? And the exact error output?

Hey @RyanVeitch
We are actually using terraform to automate the creation of alerts in New Relic APM.

module.alert_policies.newrelic_nrql_alert_condition.nrql_alert_conditions[“application_name_error_rate_5xx”]: Refreshing state… [id=:]
module.alert_policies.newrelic_nrql_alert_condition.nrql_alert_conditions[“application_name_error_rate_4xx”]: Refreshing state… [id=:*]

Error: 500 response returned: Internal Server Error
Releasing state lock. This may take a few moments...
script returned exit code 1

We are using AWS S3 backend to store terraform statefile for the alerts created.

Hello. Can you post the HCL for just one of those alerts? You should not be receiving 500s regularly, but its possible there was an issue at the time you were trying. Are you still getting those errors?