# Memory continuously increases in GKE

**URL:** <https://discuss.kubernetes.io/t/memory-continuously-increases-in-gke/16977>\
**Category:** General Discussions\
**Created:** [August 5, 2021, 8:34am UTC](https://discuss.kubernetes.io/t/memory-continuously-increases-in-gke/16977 "2021-08-05T08:34:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RomaNello](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RomaNello](https://discuss.kubernetes.io/u/RomaNello)\
**Post date:** [August 5, 2021, 8:34am UTC](https://discuss.kubernetes.io/t/memory-continuously-increases-in-gke/16977/1 "2021-08-05T08:34:30Z")

</div>

In gke environment I have a cluster with three pods on which a docker image with ubuntu and wordpress is scaled. In the infrastructure, the CPU usage is regular while the memory constantly increases until it becomes saturated in a week, around 10gb. I have 64 gigabytes of ram available and I tuned the os (cache management, logrotation management, various php.ini checks) and verified anomalous consumption by the application, but there seems to be no remedy. I don’t know where to turn my head anymore. Can you help me? Thank you

### Cluster information:

Kubernetes version: 1.20.8-gke.900   
Cloud being used: Google Cloud  
Installation method: GKE  
Host OS: ?  
CNI and version: ?  
CRI and version: ?

YAML

apiVersion: apps/v1  
kind: Deployment  
metadata:  
annotations:  
[deployment.kubernetes.io/revision:](http://deployment.kubernetes.io/revision:) “8”  
[kubectl.kubernetes.io/last-applied-configuration:](http://kubectl.kubernetes.io/last-applied-configuration:) |  
{“apiVersion”:“apps/v1”,“kind”:“Deployment”,“metadata”:{“annotations”:{},“labels”:{“run”:“appprod”},“name”:“appprod”,“namespace”:“default”},“spec”:{“replicas”:3,“selector”:{“matchLabels”:{“run”:“appprod”}},“template”:{“metadata”:{“labels”:{“run”:“appprod”}},“spec”:{“containers”:[{“env”:[{“name”:“APP\_ENGINE\_DEV\_DBHOSTNAME”,“value”:“12.50.50.2:3356”},{“name”:“APP\_ENGINE\_DEV\_DBPASSWORD”,“valueFrom”:{“secretKeyRef”:{“key”:“password”,“name”:“no-secret”}}},{“name”:“APP\_ENGINE\_DEV\_DBUSER”,“valueFrom”:{“secretKeyRef”:{“key”:“username”,“name”:“no-secret”}}},{“name”:“APP\_ENGINE\_DEV\_MODE”,“value”:“true”},{“name”:“APP\_ENGINE\_DEV\_URL”,“value”:“https:/test.com”},{“name”:“GIT\_BRANCH”,“value”:“app\_m2\_ril\_33\_08-04-2021”},{“name”:“TIPO\_INSTALLAZIONE”,“value”:“2”}],“image”:“[eu.gcr.io/project1/tw\_prod:1.0.8\_gke\_secured",“livenessProbe”:{“failureThreshold”:20,“httpGet”:{“path”:“/servizi/”,“port”:80,“scheme”:“HTTP”},“initialDelaySeconds”:60,“periodSeconds”:20,“successThreshold”:1,“timeoutSeconds”:5},“name”:“appprod”,“readinessProbe”:{“failureThreshold”:20,“httpGet”:{“path”:“/servizi/”,“port”:80,“scheme”:“HTTP”},“initialDelaySeconds”:60,“periodSeconds”:20,“successThreshold”:1,“timeoutSeconds”:5},“volumeMounts”:[{“mountPath”:“/app/wp-content/uploads”,“name”:“mypvc”}]}],“volumes”:[{“name”:“mypvc”,“persistentVolumeClaim”:{“claimName”:"nfs-server-application](http://eu.gcr.io/project1/tw_prod:1.0.8_gke_secured%22,%22livenessProbe%22:%7B%22failureThreshold%22:20,%22httpGet%22:%7B%22path%22:%22/servizi/%22,%22port%22:80,%22scheme%22:%22HTTP%22%7D,%22initialDelaySeconds%22:60,%22periodSeconds%22:20,%22successThreshold%22:1,%22timeoutSeconds%22:5%7D,%22name%22:%22appprod%22,%22readinessProbe%22:%7B%22failureThreshold%22:20,%22httpGet%22:%7B%22path%22:%22/servizi/%22,%22port%22:80,%22scheme%22:%22HTTP%22%7D,%22initialDelaySeconds%22:60,%22periodSeconds%22:20,%22successThreshold%22:1,%22timeoutSeconds%22:5%7D,%22volumeMounts%22:%5B%7B%22mountPath%22:%22/app/wp-content/uploads%22,%22name%22:%22mypvc%22%7D%5D%7D%5D,%22volumes%22:%5B%7B%22name%22:%22mypvc%22,%22persistentVolumeClaim%22:%7B%22claimName%22:%22nfs-server-application)”}}]}}}}  
creationTimestamp: “2021-03-30T19:18:27Z”  
generation: 38  
labels:  
run: appprod  
managedFields:

- apiVersion: apps/v1  
fieldsType: FieldsV1  
fieldsV1:  
f:metadata:  
f:annotations:  
.: {}  
f:kubectl.kubernetes.io/last-applied-configuration: {}  
f:labels:  
.: {}  
f:run: {}  
f:spec:  
f:progressDeadlineSeconds: {}  
f:revisionHistoryLimit: {}  
f:selector: {}  
f:strategy:  
f:rollingUpdate:  
.: {}  
f:maxSurge: {}  
f:maxUnavailable: {}  
f:type: {}  
f:template:  
f:metadata:  
f:labels:  
.: {}  
f:run: {}  
f:spec:  
f:containers:  
k:{“name”:“appprod”}:  
.: {}  
f:env:  
.: {}  
k:{“name”:“APP\_ENGINE\_DEV\_DBHOSTNAME”}:  
.: {}  
f:name: {}  
f:value: {}  
k:{“name”:“APP\_ENGINE\_DEV\_DBPASSWORD”}:  
.: {}  
f:name: {}  
f:valueFrom:  
.: {}  
f:secretKeyRef:  
.: {}  
f:key: {}  
f:name: {}  
k:{“name”:“APP\_ENGINE\_DEV\_DBUSER”}:  
.: {}  
f:name: {}  
f:valueFrom:  
.: {}  
f:secretKeyRef:  
.: {}  
f:key: {}  
f:name: {}  
k:{“name”:“APP\_ENGINE\_DEV\_MODE”}:  
.: {}  
f:name: {}  
f:value: {}  
k:{“name”:“APP\_ENGINE\_DEV\_URL”}:  
.: {}  
f:name: {}  
f:value: {}  
k:{“name”:“GIT\_BRANCH”}:  
.: {}  
f:name: {}  
k:{“name”:“TIPO\_INSTALLAZIONE”}:  
.: {}  
f:name: {}  
f:value: {}  
f:imagePullPolicy: {}  
f:livenessProbe:  
.: {}  
f:failureThreshold: {}  
f:httpGet:  
.: {}  
f:path: {}  
f:port: {}  
f:scheme: {}  
f:initialDelaySeconds: {}  
f:periodSeconds: {}  
f:successThreshold: {}  
f:timeoutSeconds: {}  
f:name: {}  
f:readinessProbe:  
.: {}  
f:failureThreshold: {}  
f:httpGet:  
.: {}  
f:path: {}  
f:port: {}  
f:scheme: {}  
f:initialDelaySeconds: {}  
f:periodSeconds: {}  
f:successThreshold: {}  
f:timeoutSeconds: {}  
f:resources: {}  
f:terminationMessagePath: {}  
f:terminationMessagePolicy: {}  
f:volumeMounts:  
.: {}  
k:{“mountPath”:“/app/wp-content/uploads”}:  
.: {}  
f:mountPath: {}  
f:name: {}  
f:dnsPolicy: {}  
f:restartPolicy: {}  
f:schedulerName: {}  
f:securityContext: {}  
f:terminationGracePeriodSeconds: {}  
f:volumes:  
.: {}  
k:{“name”:“mypvc”}:  
.: {}  
f:name: {}  
f:persistentVolumeClaim:  
.: {}  
f:claimName: {}  
manager: kubectl-client-side-apply  
operation: Update  
time: “2021-04-08T18:50:28Z”
- apiVersion: apps/v1  
fieldsType: FieldsV1  
fieldsV1:  
f:spec:  
f:replicas: {}  
f:template:  
f:spec:  
f:containers:  
k:{“name”:“appprod”}:  
f:env:  
k:{“name”:“GIT\_BRANCH”}:  
f:value: {}  
f:image: {}  
manager: GoogleCloudConsole  
operation: Update  
time: “2021-05-11T18:32:51Z”
- apiVersion: apps/v1  
fieldsType: FieldsV1  
fieldsV1:  
f:metadata:  
f:annotations:  
f:deployment.kubernetes.io/revision: {}  
f:status:  
f:availableReplicas: {}  
f:conditions:  
.: {}  
k:{“type”:“Available”}:  
.: {}  
f:lastTransitionTime: {}  
f:lastUpdateTime: {}  
f:message: {}  
f:reason: {}  
f:status: {}  
f:type: {}  
k:{“type”:“Progressing”}:  
.: {}  
f:lastTransitionTime: {}  
f:lastUpdateTime: {}  
f:message: {}  
f:reason: {}  
f:status: {}  
f:type: {}  
f:observedGeneration: {}  
f:readyReplicas: {}  
f:replicas: {}  
f:updatedReplicas: {}  
manager: kube-controller-manager  
operation: Update  
time: “2021-08-05T04:56:15Z”  
name: appprod  
namespace: default  
resourceVersion: “140885760”  
uid: 108aebfc-2964-46f0-85ad-5cdde5651c4f  
spec:  
progressDeadlineSeconds: 600  
replicas: 3  
revisionHistoryLimit: 10  
selector:  
matchLabels:  
run: appprod  
strategy:  
rollingUpdate:  
maxSurge: 25%  
maxUnavailable: 25%  
type: RollingUpdate  
template:  
metadata:  
creationTimestamp: null  
labels:  
run: appprod  
spec:  
containers:
  - env:
    - name: APP\_ENGINE\_DEV\_DBHOSTNAME  
value: 10.62.161.10:3306
    - name: APP\_ENGINE\_DEV\_DBPASSWORD  
valueFrom:  
secretKeyRef:  
key: password  
name: no-secret
    - name: APP\_ENGINE\_DEV\_DBUSER  
valueFrom:  
secretKeyRef:  
key: username  
name: no-secret
    - name: APP\_ENGINE\_DEV\_MODE  
value: “true”
    - name: APP\_ENGINE\_DEV\_URL  
value: https:/test.com
    - name: GIT\_BRANCH  
value: feature/fix\_error\_logs\_05\_2021
    - name: TIPO\_INSTALLAZIONE  
value: “2”  
image: [Google Cloud console](http://eu.gcr.io/project1/tw_prod:1.0.9_gke_secured_hardening_log)  
imagePullPolicy: IfNotPresent  
livenessProbe:  
failureThreshold: 20  
httpGet:  
path: /servizi/  
port: 80  
scheme: HTTP  
initialDelaySeconds: 60  
periodSeconds: 20  
successThreshold: 1  
timeoutSeconds: 5  
name: appprod  
readinessProbe:  
failureThreshold: 20  
httpGet:  
path: /servizi/  
port: 80  
scheme: HTTP  
initialDelaySeconds: 60  
periodSeconds: 20  
successThreshold: 1  
timeoutSeconds: 5  
resources: {}  
terminationMessagePath: /dev/termination-log  
terminationMessagePolicy: File  
volumeMounts:
    - mountPath: /app/wp-content/uploads  
name: mypvc  
dnsPolicy: ClusterFirst  
restartPolicy: Always  
schedulerName: default-scheduler  
securityContext: {}  
terminationGracePeriodSeconds: 30  
volumes:

  - name: mypvc  
persistentVolumeClaim:  
claimName: nfs-server-application  
status:  
availableReplicas: 3  
conditions:

- lastTransitionTime: “2021-05-11T18:46:04Z”  
lastUpdateTime: “2021-07-15T17:02:39Z”  
message: ReplicaSet “app-6c8864897c” has successfully progressed.  
reason: NewReplicaSetAvailable  
status: “True”  
type: Progressing
- lastTransitionTime: “2021-08-05T04:56:15Z”  
lastUpdateTime: “2021-08-05T04:56:15Z”  
message: Deployment has minimum availability.  
reason: MinimumReplicasAvailable  
status: “True”  
type: Available  
observedGeneration: 38  
readyReplicas: 3  
replicas: 3  
updatedReplicas: 3
