Jump to content

Ghost session problem still not fixed ?


Recommended Posts

vincen
Posted

Hi

Since I use Emby (around a little more than 2 years now), I have always had that issue with Android users. They often don't disconnect/finish properly stream sessions and so I have a bunch of ghost sessions that stay there forever :( Only way to get rid of them is to restart Emby server..... as they don't show any stop buttons like sessions that are running and not hanging.

Is it planned to get that issue fixed ? as it's there since at least 2 years (happen a lot more with devices like Chromecast but happens also with regular android clients).

Copiedcran_20260429_091408.thumb.png.571e6d291fcff186e5e0aeea9112c717.png

Thanks

Vincèn

kikinjo
Posted

This was never fixed, in latest android unified app 95% of clients are non stop ghosts but now with bonus feature, now you don't have controls at all (stop pause, etc..)

Look at it as "new feature"

/s

  • Sad 1
vincen
Posted
2 hours ago, kikinjo said:

This was never fixed, in latest android unified app 95% of clients are non stop ghosts but now with bonus feature, now you don't have controls at all (stop pause, etc..)

Look at it as "new feature"

oki so will have to live with it for a long time yet 😑

yocker
Posted

You can use this plugin i had an AI make me back when i had the same problems.
Added the code as well in case people want to go through the code it made.

SessionKiller.dll SessionKiller.zip

Posted
On 4/29/2026 at 3:16 AM, vincen said:

Hi

Since I use Emby (around a little more than 2 years now), I have always had that issue with Android users. They often don't disconnect/finish properly stream sessions and so I have a bunch of ghost sessions that stay there forever :( Only way to get rid of them is to restart Emby server..... as they don't show any stop buttons like sessions that are running and not hanging.

Is it planned to get that issue fixed ? as it's there since at least 2 years (happen a lot more with devices like Chromecast but happens also with regular android clients).

Copiedcran_20260429_091408.thumb.png.571e6d291fcff186e5e0aeea9112c717.png

Thanks

Vincèn

Hi there, please attach the Emby server log from when the problem occurred:

Thanks!

 

vincen
Posted
6 hours ago, Luke said:

Hi there, please attach the Emby server log from when the problem occurred:

@Luke thanks but already posted in past and problem was not fixed and not posting anymore in all matters any logs here for confidentiality reasons..

vincen
Posted
On 4/29/2026 at 3:29 PM, yocker said:

You can use this plugin i had an AI make me back when i had the same problems.
Added the code as well in case people want to go through the code it made.

SessionKiller.dll 13 kB · 1 download SessionKiller.zip 65.44 kB · 2 downloads

Thanks for the share @yockerunhappy I'm unable to check the source code so can't use the plugin (sorry but 0 faith in AI stuffs 😄

 

  • Like 1
Neminem
Posted (edited)
1 hour ago, vincen said:

unhappy I'm unable to check the source code so can't use the plugin

Well run the source code through AI to find any bugs, thats called AI checking AI 🤣😂

😂🤣 here har a list of most of his plugins, I have helped test most of them.

yocksers (yock) / Repositories

Edited by Neminem
  • Like 1
yocker
Posted (edited)
1 hour ago, vincen said:

Thanks for the share @yockerunhappy I'm unable to check the source code so can't use the plugin (sorry but 0 faith in AI stuffs 😄

 

Understandable.

I just couldn't be bothered doing anything my self as i have enough to do with my other plugins. :) 

Edited by yocker
  • Like 1
vincen
Posted
3 hours ago, yocker said:

Understandable.

I just couldn't be bothered doing anything my self as i have enough to do with my other plugins. :) 

so I copied the file with your other very nice plugin Embyicons. Embyicons shows up well, I could install it and it now works perfect but the SessionKiller one not 😞 Is it still compatible with current Emby server version ? (4.9.3.0)

yocker
Posted (edited)
1 hour ago, vincen said:

so I copied the file with your other very nice plugin Embyicons. Embyicons shows up well, I could install it and it now works perfect but the SessionKiller one not 😞 Is it still compatible with current Emby server version ? (4.9.3.0)

I will go through the code that the AI made and see if i can see the problem.

image.png.0cd7fc08ddaf6a0e99aee6e205a55cf1.png

In case you missed it, it doesn't have any image or anything as it was as said just AI and all it was asked was make a plugin to kill idle sessions. 

Also if for the Windows version of Emby then the plugin should be placed in programdata\plugins and not system\plugins.

Edited by yocker
vincen
Posted
39 minutes ago, yocker said:

In case you missed it, it doesn't have any image or anything as it was as said just AI and all it was asked was make a plugin to kill idle sessions. 

Also if for the Windows version of Emby then the plugin should be placed in programdata\plugins and not system\plugins.

Thanks for the detail but yeah I confirm it doesn't show up at all in the Plugin library on my server.

I'm on Linux and I putted it not in the system but where all files created by emby are and where I putted the EmbyIcons one but found out it had wrong rights on file 😞 sorry for that 🙈 I'll try again later when I can restart Emby server to check if it shows up and will let you know ;)

  • Like 1
yocker
Posted
7 minutes ago, vincen said:

Thanks for the detail but yeah I confirm it doesn't show up at all in the Plugin library on my server.

I'm on Linux and I putted it not in the system but where all files created by emby are and where I putted the EmbyIcons one but found out it had wrong rights on file 😞 sorry for that 🙈 I'll try again later when I can restart Emby server to check if it shows up and will let you know ;)

No need to apologize. :) 

Just AI generated anyway because i was too lazy. Maybe if i wasn't so lazy... ;) 

  • Haha 1
vincen
Posted
10 hours ago, yocker said:

No need to apologize. :) 

Just AI generated anyway because i was too lazy. Maybe if i wasn't so lazy... ;) 

I restarted the Emby server and still it doesn't show up in any categories of plugins 😉 It showed up straight in installed plugins 😄 so it looks all good now, will see if I have less hanging sessions now, will keep you updated !

yocker
Posted
3 hours ago, vincen said:

I restarted the Emby server and still it doesn't show up in any categories of plugins 😉 It showed up straight in installed plugins 😄 so it looks all good now, will see if I have less hanging sessions now, will keep you updated !

Yeah, it's not in the catalog if that's where you looked.

  • Thanks 1
vincen
Posted
On 5/2/2026 at 8:49 PM, yocker said:

In case you missed it, it doesn't have any image or anything as it was as said just AI and all it was asked was make a plugin to kill idle sessions. 

@yocker Just to let you know that it doesn't look to work. I don't know if it's due at my installation or Emby server version or something else but it doesn't delete any ghost sessions (I have setup it at 10 minutes to be sure). Also what is the exact use of the option in the plugin ? A little confused by the wording (When enabled, sessions currently playing media will also be terminated if they exceed the inactivity timeout.). How a playing session can be inactive ? because the ghost session are not progressing in play status.

Thanks

yocker
Posted (edited)
2 hours ago, vincen said:

@yocker Just to let you know that it doesn't look to work. I don't know if it's due at my installation or Emby server version or something else but it doesn't delete any ghost sessions (I have setup it at 10 minutes to be sure). Also what is the exact use of the option in the plugin ? A little confused by the wording (When enabled, sessions currently playing media will also be terminated if they exceed the inactivity timeout.). How a playing session can be inactive ? because the ghost session are not progressing in play status.

Thanks

With the setting you mentioned it will also terminate sessions that are NOT idle. It a stupid setting but one i asked it to add in case i had to do debugging.
As said, this plugin was minimal effort from me and made with AI as i have enough to do with other things. ;) 

With that setting off:
User pauses or closes a video stream without exiting Emby, the stream will start to idle, when idle for the set amount of time the plugin will remove the session.
 

At around 28 seconds in you can see it removed the idle session.
Users will not notice anything and can resume the stream as if nothing had happened.

I've looked a bit through the code and can't see anything really wrong with it at first glance, it looks like the AI did a pretty good job at making it.
I've tested it on Windows, Ubuntu and Docker versions of Emby and it works with all of them.
 

Edited by yocker
vincen
Posted
38 minutes ago, yocker said:

With the setting you mentioned it will also terminate sessions that are NOT idle. It a stupid setting but one i asked it to add in case i had to do debugging.
As said, this plugin was minimal effort from me and made with AI as i have enough to do with other things. ;) 

With that setting off:
User pauses or closes a video stream without exiting Emby, the stream will start to idle, when idle for the set amount of time the plugin will remove the session.

Thanks for all the tests and the video unhappy on my Emby server it doesn't work at all. I have setup it at 10 minutes without the option but it's doing nothing 😞 I checked in Emby logs but I see no mention anywhere of Session Killer. No idea what to test else to find the issue....

yocker
Posted

I see the problem.

It only works on the webclient as the apps sends a "keep-alive" alike signal.
Will see if i can find out something though hadn't planned on working on this plugin at all. :) 

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...