hawtio / hawtio-oauth

OAuth integration plugins for hawtio 2.x
Apache License 2.0
6 stars 14 forks source link

Reproduce unresponsive hawtio and possible solution #23

Closed saiello closed 2 years ago

saiello commented 3 years ago

I changed the pre boot task registration to make it works, but I have to revert it

tadayosi commented 2 years ago

Can you please write an issue first?

tadayosi commented 2 years ago

Sorry, I found the issue filed already. Just reopen it.

saiello commented 2 years ago

Hi, @tadayosi since last time I used the console the bug is still present. A simple work around is to limit the keepaliveInterval avoiding the continuous firing of XHR by the ng-interval module.

I resolve any conflict and push the fix again.

tadayosi commented 2 years ago

22

tadayosi commented 2 years ago

@saiello Thanks for your pull req. Let me understand why it fixes the issue of unresponsiveness.

The root cause seems to be the $interval of angularJS with very high interval value. In this case keepalive has been started with an interval value of ~15768000 ( 63072000 / 4 ).

  1. Why does having a high value with $interval cause the unresponsiveness? Having a high interval sounds rather more harmless to me.
  2. About the cap number 60. The default interval of ng-idle is 10 * 60. What about using the ng-idle default 10 * 60 instead of 60? Or as it should work as a max limit cap, maybe we can choose a higher value such as 1 * 60 * 60.
saiello commented 2 years ago

@tadayosi I open a issue on ng-idle as well https://github.com/moribvndvs/ng-idle/issues/231.

  1. Why does having a high value with $interval cause the unresponsiveness? Having a high interval sounds rather more harmless to me.

Having a value higher than 15032385 make the KeepAlive component to have an unexpected behaviour. It starts continuously firing the event.

  1. About the cap number 60. The default interval of ng-idle is 10 60. What about using the ng-idle default 10 60 instead of 60? Or as it should work as a max limit cap, maybe we can choose a higher value such as 1 60 60.

It's ok to increase at a higher value as long as it is less than or equal to 15032385.