-
Notifications
You must be signed in to change notification settings - Fork 38.5k
WebSocket stats not updated correctly when sessions cleared #29375
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
Comments
This is strange. The first is the size of
It does seem like there is a fair number of transport errors (connection dropped). Also those "closed abnormally" means that a WebSocket connection can be established but no messages came which could be a proxy issue. In cases a WebSocket connection can't even be established, it should fall back on HTTP transports, and I would have thought those polling/streaming session numbers should be higher. |
We use traefik as our proxies and have no problems connecting via websocket. The http status code stats do not indicate any abnormal behaviour regarding the proxying of requests. The "connect failure" stats are probably from users behind coporate proxies, which remove the Upgrade Header from all requests, which we know exist (a few). |
Okay, I finally see where the issue is. We keep stats by WebSocket session type (websocket, stream, poll), and therefore need to locate the right counter by session type. However, the session is decorated after it is established, and when it is closed it must be unwrapped. This works as expected when the session is closed normally since |
On closer look at the stats again , I don't think there are limit exceeded exceptions, or they would show as "send limit". In any case, I did find a problem, and will fix it. I'm not sure what else to do here without a way to reproduce it. |
Closing this for now. You can try with 5.3.26 once available. |
Hey, we are still experiencing this issue with Spring Boot 3.0.6, which uses
|
Affects:
We are using spring boot with STOMP via SockJS and Websockets. We have app and website clients. However the Websocket Stats do not match the actual user count after a certain amount of time, here is an excerpt from our logs. You can already see at the third message, that there are more websocket sessions reporterd than there are sessions in general. If you look at the last message, this will go to extremes (573 actual sessions, 4791 reported websocket sessions).
I don't know if this issue also extends to Http Streaming or Polling, because we have very few clients using this method.
The text was updated successfully, but these errors were encountered: