Introduction
Note: The Terraform Enterprise Backup and Restore API is intended for use primarily before migrating to a new TFE host or when transitioning between Production mode types, rather than as a routine backup solution.
Problem
Terraform Enterprise (TFE) administrators who frequently use the Backup and Restore API may notice a steady increase in system memory utilization, even when there is no identifiable cause within the application.
Prerequisites
- Terraform Enterprise installed and operational.
- Administrative access to the TFE host.
Cause
Frequent use of the TFE Backup and Restore API can increase the likelihood of a stalled backup process. This creates a zombie process that continues to consume system memory until it is terminated. This issue can be more pronounced on larger TFE instances that require more resources to back up.
Solution
To resolve the memory issue, you must find and terminate any stalled backup-restore processes on the TFE host.
Step 1: Find Stalled Processes
Use the ps command to find any zombie backup-restore processes.
$ ps -ef | grep backup-restore
Step 2: Terminate Stalled Processes
Use the kill and pgrep commands to terminate the stalled processes you identified.
$ kill $(pgrep backup-restore)
Outcome
After you terminate any zombie processes, the system memory consumed by TFE should return to its normal operating range.