# Connectionstring files under /tmp keeps growing

**URL:** <https://forums.foundationdb.org/t/connectionstring-files-under-tmp-keeps-growing/3667>\
**Category:** Kubernetes Operator\
**Tags:** operator\
**Created:** [November 22, 2022, 7:10am UTC](https://forums.foundationdb.org/t/connectionstring-files-under-tmp-keeps-growing/3667 "2022-11-22T07:10:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![liuyan](https://avatars.discourse-cdn.com/v4/letter/l/839c29/32.png) [@liuyan](https://forums.foundationdb.org/u/liuyan)\
**Post date:** [November 22, 2022, 7:10am UTC](https://forums.foundationdb.org/t/connectionstring-files-under-tmp-keeps-growing/3667/1 "2022-11-22T07:10:07Z")

</div>

enter controller pod, I found a lot of tmp files,  
sample ones like

```auto
1313432445 1765504520 2252113759 2766782958 3096530237 3535853926 3916635754 458324948 925391022
1333991883 1773089352 2268308434 2771825002 310151260 3541135801 3923197243 460385429 925960843

```

check contents, mostly are connectionstring  
tracing back to operator code, it is in fdbclient/admin\_client.go

```auto
func NewCliAdminClient(cluster *fdbv1beta2.FoundationDBCluster, _ client.Client, log logr.Logger) (fdbadminclient.AdminClient, error) {
	clusterFile, err := os.CreateTemp("", "")

```

although the clusterFile is small,

```auto
ls -l 3589704616
-rw-------. 1 1000710000 1000710000 121 Nov 21 09:52 3589704616

```

but in our controller, we’ll call fdbcli commands like 10 times per minute, so it will continously growing, only after a few hours, it is more than 30M, and we set ephemeral-storage to 100M, it will trigger pod evicted because of exceeding the limit.  
thinking since connectionstring won’t change much, why for every call we write a tmp file? thanks

---

<div class="post-metadata">

**Author:** ![johscheuer](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@johscheuer](https://forums.foundationdb.org/u/johscheuer)\
**Post date:** [November 22, 2022, 8:37am UTC](https://forums.foundationdb.org/t/connectionstring-files-under-tmp-keeps-growing/3667/2 "2022-11-22T08:37:17Z")

</div>

We actually have a fix for that: [Use deterministic name for cluster file by johscheuer · Pull Request #1374 · FoundationDB/fdb-kubernetes-operator · GitHub](https://github.com/FoundationDB/fdb-kubernetes-operator/pull/1374). The problem is not that we use a temporary file but rather that those temp files are not cleaned up properly. Initially we used the cluster name but that that some other drawbacks (there are some issues around that topic in the GitHub repository if you’re interested).

I would assume that this fix will be in the next release of the operator.
