# Pods not destroyed till 3 - 4 days

**URL:** <https://support.openanalytics.eu/t/pods-not-destroyed-till-3-4-days/2264>\
**Category:** ShinyProxy\
**Created:** [May 11, 2022, 6:24pm UTC](https://support.openanalytics.eu/t/pods-not-destroyed-till-3-4-days/2264 "2022-05-11T18:24:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkagr](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/rkagr/32/654_2.png) [@rkagr](https://support.openanalytics.eu/u/rkagr)\
**Post date:** [May 11, 2022, 6:24pm UTC](https://support.openanalytics.eu/t/pods-not-destroyed-till-3-4-days/2264/1 "2022-05-11T18:24:37Z")

</div>

Hi All,  
I have a shinyproxy running on EKS. As far as I understand there should not be a way for an application pod to be alive till 3 or 4 days unless someone is working on it for this period of time.

my config is a below  
proxy:  
title:   
logo-url: \<\>  
port: 8080  
container-wait-time: 60000  
container-log-path: /opt/shinyproxy/container-logs  
authentication: keycloak  
keycloak:  
realm:\<\>  
auth-server-url: \<\>  
resource: \<\>  
credentials-secret: \<\>  
ssl-required: none  
admin-groups: admins  
container-backend: kubernetes  
kubernetes:  
internal-networking: true  
image-pull-policy: Always  
specs:  
- id: assortment\_tools  
display-name: Assortment Tools  
description: Assortment Tools include Sortimentsrahmen as well as several other standart reportings to help improve our assortment  
container-cmd: [“R”, “-e”, “shiny::runApp(’/root/’, host=‘0.0.0.0’, port=3838)”]  
container-image:   
access-groups: \<\>  
kubernetes-pod-patches: |  
- op: add  
path: /spec/volumes  
value:  
- name: redshift-connection  
secret:  
secretName: \<sec\_name\>  
- op: add  
path: /spec/containers/0/volumeMounts  
value:  
- name: \<\>  
mountPath: /root//cred  
logging:  
file:  
/opt/shinyproxy/logs/shinyproxy.log

Please guide me if I understand wrong?  
If I stay idle for sometime or if I logout the container is deleted, I see only one way the container is alive is use closes the tab and the proxy has no idea about it.

---

<div class="post-metadata">

**Author:** ![tdekoninck](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/tdekoninck/32/1079_2.png) [@tdekoninck](https://support.openanalytics.eu/u/tdekoninck)\
**Post date:** [May 16, 2022, 7:40am UTC](https://support.openanalytics.eu/t/pods-not-destroyed-till-3-4-days/2264/2 "2022-05-16T07:40:00Z")

</div>

Hi

Indeed, with this configuration, the apps/pods should automatically terminate when the user closes their browser tab.

Can you try these two steps:?

1. enable debug logging for the heartbeats of ShinyProxy, by adding the following block to the configuration. Make sure to add the `logging` at the same level as the `proxy` property (so not below proxy).

```auto
logging:
    eu:
      openanalytics:
        containerproxy:
          service:
            hearbeat: DEBUG

```

1. configure the admin panel (see the `admin-groups` property [https://shinyproxy.io/documentation/configuration/#general](https://shinyproxy.io/documentation/configuration/#general) ) . Then open the admin panel and look for the apps in the table that will not get terminated.

If the apps keep receiving heartbeats, this means that the user did not close their browser tab. If you don’t see any heartbeats, and the app stays alive, we might have a bug.

---

<div class="post-metadata">

**Author:** ![kushalmps](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/kushalmps/32/1062_2.png) [@kushalmps](https://support.openanalytics.eu/u/kushalmps)\
**Post date:** [December 5, 2024, 6:46pm UTC](https://support.openanalytics.eu/t/pods-not-destroyed-till-3-4-days/2264/3 "2024-12-05T18:46:53Z")

</div>

Hey @tdekoninck ,

I think we do have a bug. We are currently running the shinyproxy in kubernetes cluster where each application launched belongs to the replica set. Observation in this particular is that whenever a new replica set is created when patched shinyproxy. The previous replicaset stays till it has a websocket but when a user closes browser on a running application the replica set gets destroyed and the application pods still running as there is no running hearbeat.
