Ghost users remain in user list for days — can't disconnect or monitor
Posted: 18 Mar 2025, 11:16
I'm experiencing a strange issue with my SmartFoxServer (using a custom extension). Occasionally, some nicknames remain visible in the user list for days — as if they're still connected. However, when I try to monitor or disconnect them from the AdminZone, I get this message:
"The User being monitored is no more available on the server, please select another one."
This seems contradictory — if the user is no longer on the server, then why is their nickname still visible in the user list? I can’t monitor them, can’t disconnect them, and yet they’re stuck in the interface.
Unfortunately, I can't afford to restart the server every time this happens, so I’m looking for some guidance:
What could be causing this? Could it be an improperly closed session?
Is there a way to clean up these “ghost” users programmatically, without restarting the server?
Can I verify or remove invalid sessions through my extension?
I'm already using UserDisconnectHandler to manage disconnections and update the database properly. The user session stores fields like login_timestamp, user_id, and others at login.
Any insights or similar experiences would be greatly appreciated.
Thanks a lot!
"The User being monitored is no more available on the server, please select another one."
This seems contradictory — if the user is no longer on the server, then why is their nickname still visible in the user list? I can’t monitor them, can’t disconnect them, and yet they’re stuck in the interface.
Unfortunately, I can't afford to restart the server every time this happens, so I’m looking for some guidance:
What could be causing this? Could it be an improperly closed session?
Is there a way to clean up these “ghost” users programmatically, without restarting the server?
Can I verify or remove invalid sessions through my extension?
I'm already using UserDisconnectHandler to manage disconnections and update the database properly. The user session stores fields like login_timestamp, user_id, and others at login.
Any insights or similar experiences would be greatly appreciated.
Thanks a lot!