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

Hasura websockets operation active not decrease #19

Open
vnmedeiros opened this issue Oct 7, 2022 · 2 comments
Open

Hasura websockets operation active not decrease #19

vnmedeiros opened this issue Oct 7, 2022 · 2 comments

Comments

@vnmedeiros
Copy link

Hi, I'm a little confused.
In the metric hasura_websockets_operations_active even when all hasura websockets/subscriptions are no active, the view does not decrease the number of the operations actives.
Could it be a problem collecting the metric?

see example:
hasuraWebSocketsOperations

@afitzek
Copy link
Owner

afitzek commented Oct 11, 2022

There could be a problem when collecting the metric.

Which hasura version are you using?

I'll try to reproduce it, when I find some time.

@noisyscanner
Copy link

noisyscanner commented Oct 24, 2024

Back from the dead... 💀

Just ran into what seems like this issue (??) - it looks like Hasura does not emit a stopped log when the underlying websocket is closed - eg if I closed the browser tab rather than unsubscribing presumably?
Can see in this screenshot - 2 websockets opened, some subscriptions were started, and then the websockets were closed, but no stopped logs were ever written.

image

Does seem like a bug on Hasura's end - I don't have much faith in them fixing this in any reasonable timeframe though.
I wonder if it would be feasible for hasura-metric-adapter to keep a count of operations per socket id, and then decrement the counter by that when a websocket closed event is received. 🤔

**EDIT: ** will have a bash at fixing this in Hasura itself, and revert back to the above solution if that fails 🤞🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants