Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does "no activity" in the description of "secondsOfRunBeforeIdling" CR mean? #22246

Closed
top1436 opened this issue May 31, 2023 · 4 comments
Closed
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator area/devworkspace-operator kind/question Questions that haven't been identified as being feature requests or bugs. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. team/A This team is responsible for the Che Operator and all its operands as well as chectl and Hosted Che team/B This team is responsible for the Web Terminal, the DevWorkspace Operator and the IDEs.

Comments

@top1436
Copy link

top1436 commented May 31, 2023

Summary

In the CR, There is a "devEnvironments.secondsOfRunBeforeIdling" field. It said "Idle timeout for workspaces in seconds. This timeout is the duration after which a workspace will be idled if there is "no activity". To disable workspace idling due to inactivity, set this value to -1." and default values is "1800"

I want to know how to check the no activity.

  1. how to check the duration
  • which process checks the duration?
  1. when the no acitivity status is changed
  • how to determine whether it is active or not.

Relevant information

No response

@top1436 top1436 added the kind/question Questions that haven't been identified as being feature requests or bugs. label May 31, 2023
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label May 31, 2023
@tolusha tolusha added the area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator label May 31, 2023
@dmytro-ndp dmytro-ndp added area/devworkspace-operator team/A This team is responsible for the Che Operator and all its operands as well as chectl and Hosted Che team/B This team is responsible for the Web Terminal, the DevWorkspace Operator and the IDEs. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels May 31, 2023
@top1436
Copy link
Author

top1436 commented Jun 16, 2023

@tolusha @dmytro-ndp Can anyone answer this for me?

@dkwon17
Copy link
Contributor

dkwon17 commented Jun 16, 2023

Hello @top1436 , sorry for the delay, I think you're referring to devEnvironments.secondsOfInactivityBeforeIdling instead of devEnvironments.secondsOfRunBeforeIdling is that right?

how to check the duration

To check the inactivity idle duration for the workspace, you can run the following within the workspace:

$ env | grep SECONDS_OF_DW_INACTIVITY_BEFORE_IDLING

SECONDS_OF_DW_INACTIVITY_BEFORE_IDLING=10800

The env variable should be the same as the value in the CR. If the value in the CR is updated with a new idle timeout, the new timeout will be applied on newly started workspaces.

which process checks the duration?

The process that reads this value, and is responsible for terminating idled workspaces is che-machine-exec:

$ ps aux | grep machine-exec

user          19  0.0  0.0 741192 30212 ?        Sl   13:22   0:00 /checode/bin/machine-exec --url 0.0.0.0:3333

when the no acitivity status is changed
how to determine whether it is active or not.

Activity is being detected with this built-in extension: che-incubator/che-code#65

To verify that activity is being detected and sent to che-machine-exec, you can run the following to view the activity/tick requests:

$ cat /checode/entrypoint-logs.txt | grep /activity/tick

[GIN] 2023/06/16 - 13:22:33 | 204 |       3.371µs |       127.0.0.1 | POST     /activity/tick
[GIN] 2023/06/16 - 13:23:59 | 204 |       3.621µs |       127.0.0.1 | POST     /activity/tick
[GIN] 2023/06/16 - 13:24:59 | 204 |       2.361µs |       127.0.0.1 | POST     /activity/tick
[GIN] 2023/06/16 - 13:25:59 | 204 |       2.642µs |       127.0.0.1 | POST     /activity/tick

@top1436
Copy link
Author

top1436 commented Jun 21, 2023

@dkwon17 Thank you for your explanation.

"devEnvironments.secondsOfInactivityBeforeIdling" is right. my bad..

If che-code built-in extension checks "Activity", Another IDE cannot be applied this option? ex) IntelliJ

In my exprience, Intellij is also applied this option and it stopped Intellij workspace after the seconds.

In IntelliJ, Is it implemented a different way?

@che-bot
Copy link
Contributor

che-bot commented Dec 18, 2023

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 che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 18, 2023
@che-bot che-bot closed this as completed Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator area/devworkspace-operator kind/question Questions that haven't been identified as being feature requests or bugs. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. team/A This team is responsible for the Che Operator and all its operands as well as chectl and Hosted Che team/B This team is responsible for the Web Terminal, the DevWorkspace Operator and the IDEs.
Projects
None yet
Development

No branches or pull requests

5 participants