Why become a ghost user?

My application uses lib-jitsi-meet in chrome.
If user close browser or reload the page during a meeting, user is sometime left as a ghost user.
This issue appears to be more likely to occur on android and IOS.

In about 30 to 60 seconds, this ghost user will disappear.
However, I don’t want to occur ghost users.

Why do ghost users occur?
Does anyone have any leads on the investigation?

What version of Prosody are you running?

Thank you for your reply.
Sorry, how do I get the version of prosody?

I followed the self-hosting guide and installed it on an AWS EC2 ubuntu20.04 server.
$ dpkg -l | grep jitsi
ii jitsi-meet 2.0.6173-1 all WebRTC JavaScript video conferences
ii jitsi-meet-prosody 1.0.5211-1 all Prosody configuration for Jitsi Meet
ii jitsi-meet-turnserver 1.0.5211-1 all Configures coturn to be used with Jitsi Meet
ii jitsi-meet-web 1.0.5211-1 all WebRTC JavaScript video conferences
ii jitsi-meet-web-config 1.0.5211-1 all Configuration for web serving of Jitsi Meet
ii jitsi-videobridge2 2.1-538-g062e9f56-1 all WebRTC compatible Selective Forwarding Unit (SFU)

Prosody 0.11.4-1 is installed

$ sudo dpkg -l prosody
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
++±==============-============-============-=================================
ii prosody 0.11.4-1 amd64 Lightweight Jabber/XMPP server

Lib-jitsi-meet has a logic on page unload to use beacon to send presence unavailable, if that is not sent, what you see is a ghost, like that user lost its connection.

That’s why
Is it possible to shorten the timeout period or the interval between health checks to see if a participant is active?

Nope, the bosh connection by spec timeouts in 60 seconds.

I see.
Currently, the client connects to prosody using http-bind, but if I change to websocket, will the timeout still be 60 seconds?

Yes, but that can be adjusted, I think.

smack_hibernation_time is recommended 60 seconds, you can adjust that.

Thank you. I’ll try it.
I think that extremely short timeout kick slow network users.

I used this link to adjust the time for smack_hibernation_time.
It’s working fine.
Thank you very much.
This time I used websocket.
Does the smack configuration work with http-bind?

smacks is used only with websockets, for bosh there are other mechanisms.

I see.
Are you saying that bosh also has a setting like smack_hibernation_time?

Nope, bosh by spec has a 60 seconds timeout, if no update is received in 60 seconds, the connection is dropped. And bosh has a session-id used on reconnection, to restore a previous session in that niiterval.

/etc/prosody/conf.avail/domain.cfg
Maybe it is deprecated, but it seems to adjust the bosh timeout by add setting bosh_max_inactivity.
mod_bosh – Prosody IM.

By the way, ghost users do occur on my server’s jitsi-meet.
The current known procedure is to close the tab in chrome on iOS or android during the meeting.
However, the ghost user did not occur on https://meet.jit.si/.
Does it have something to do with the update?

Yes, you can, but client side you need to rebuild one of the dependencies of lib-jitsi-meet and lib-jitsi-meet itself in order to adjust that. So its not a trivial change.

Not sure what can be the reason, try updating prosody to latest from their repo.

I’ll use the latest version. Thanks for the support!