Why is my private worker crashing on Spacelift?
Problem:
I am experiencing continuous failures with a Terraform-managed stack running in an AWS Private Worker, marked by the “worker has crashed” error. This issue seems isolated to one particular stack only.
Investigation Suggestions:
-
Memory Exhaustion
The most likely culprit is out of memory issues on your EC2 instance where Spacelift operates these private workers - this can often happen when deploying large infrastructures that overwhelm the worker’s resources. Check AWS CloudWatch Metrics for CPU and Memory usage to diagnose if resource allocation is at fault here, adjust as necessary (either scaling up or optimizing your stack). -
Debugging with Terraform
If you’re utilizing the terragrunt wrapper in conjunction with Spacelift, it might reveal more detail on what leads to failure through its debug mode – setTF_LOG=DEBUG
within environment variables for enhanced logging: Terraform Debugging Guide. -
Community Knowledge and Resources
Explore the GitHub community’s discussions where similar problems may have been documented, offering tailored advice: Spacelift on GH. Additionally, consider reaching out directly with detailed logs or relevant context to get specific guidance from the Spacelift team (Support Forum Link).
Conclusion:
With these steps for thorough investigation and community assistance at your disposal, resolving a private worker crash on Spacelift should be within reach. We wish you success in debugging this issue!