che icon indicating copy to clipboard operation
che copied to clipboard

How to increase the timeout of the workspace?

Open josefredohd opened this issue 6 years ago • 10 comments

I am using eclipse che in google chrome, but it stops due to inactivity

josefredohd avatar Apr 15 '20 19:04 josefredohd

@josefredohd the way how you can increase it depends on the way you deployed Che: Helm

kubectl patch configmap che --patch "{\"data\":{\"CHE_LIMITS_WORKSPACE_IDLE_TIMEOUT\": \"-1\"}}" --type=merge -n che
kubectl rollout restart deployment/che -n che

Operator:

kubectl patch checluster/eclipse-che --patch "{\"spec\":{\"server\":{\"customCheProperties\": {\"CHE_LIMITS_WORKSPACE_IDLE_TIMEOUT\": \"-1\"}}}}" --type=merge -n che

P.S. There is -1 - not limited, but feel free to assign any value in milliseconds (the default value 1800000 (30minutes)).

It must be documented!

sleshchenko avatar Apr 17 '20 07:04 sleshchenko

@sleshchenko How can I do it from the chrome browser?

josefredohd avatar Apr 17 '20 20:04 josefredohd

@josefredohd you're able to just execute commands I shared in the terminal. I'm not able to provide you instructions on how you can update it from chrome, since I don't know which platform you use, k8s/OS, which version...

sleshchenko avatar Apr 21 '20 10:04 sleshchenko

Also note that if this is referring to che.openshift.io, the inactivity timeout is set at 30 minutes and cannot be modified as this is a Che server setting.

amisevsk avatar Apr 21 '20 20:04 amisevsk

@sleshchenko I am using the k8s platform

josefredohd avatar Apr 23 '20 21:04 josefredohd

I am using gcloud + k8s + helm. So for the helm scenario described by @sleshchenko , I had to remove the outer "spec" part of the json, because if I followed those instructions, the first command would return:

configmap/che patched (no change)

So, to rephrase it to what I did to get it to update properly:

kubectl patch configmap che --patch "{\"data\":{\"CHE_LIMITS_WORKSPACE_IDLE_TIME
OUT\": \"-1\"}}" --type=merge -n che
kubectl rollout restart deployment/che -n che

codingkriggs avatar Aug 28 '20 19:08 codingkriggs

@codingkriggs thanks for providing the fix. I've updated my comment as well to avoid confusion.

sleshchenko avatar Aug 31 '20 07:08 sleshchenko

Also, documentation for editing the CheCluster CR in the case of an operator installation, and the che ConfigMap in the case of a helm installation are at advanced configuration options for the che server component. It is under Installation Guide -> Configuring Che -> Advanced Configuration Options for Che Server. Maybe this page belongs in the Administration Guide, or not nested so deeply?

tomgeorge avatar Sep 02 '20 21:09 tomgeorge

Docs Jira issue https://issues.redhat.com/browse/RHDEVDOCS-2581

yhontyk avatar Jan 29 '21 10:01 yhontyk

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

che-bot avatar Aug 09 '21 13:08 che-bot