Giter VIP home page Giter VIP logo

Comments (3)

jacaru avatar jacaru commented on June 6, 2024

Looking around the code a bit more I realized that the logging I am seeing is more strictly related to the keepalive handling of the websocket rather than the session tied to it. I don't see a connection on how the websocket being discarded for keepalive handling makes that websocket or the session tied to it inoperable. Closing for now. I will keep an eye on this. If what I did helps or a find out about anything else, I will leave word here.

from jellyfin-kodi.

jacaru avatar jacaru commented on June 6, 2024

Before I lose track of it, wanted to add that before trying the above, I tried setting the ping timeout option on the client websocket:

self.wsc.run_forever(ping_interval=10, ping_timeout=9)

And with that I saw constant client reconnects on the server logs with this pattern

[2023-11-20 02:23:43.139 +01:00] [INF] [122] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "10.8.1.12" request
[2023-11-20 02:23:45.124 +01:00] [INF] [40] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Sync Requested for UserID: '"58b5c911ad634d57aff08628b156dae4"' with LastUpdateDT: '"2023-11-20T01:19:57z"'
[2023-11-20 02:23:45.154 +01:00] [INF] [40] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Added: 0, Removed: 0, Updated: 19, Changed User Data: 0
[2023-11-20 02:23:45.155 +01:00] [INF] [40] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Request Finished Taking "00:00:00.0303151"
[2023-11-20 02:24:31.206 +01:00] [INF] [27] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2023-11-20 02:24:43.206 +01:00] [INF] [91] Emby.Server.Implementations.Session.SessionWebSocketListener: Lost 1 WebSockets.
[2023-11-20 02:31:36.537 +01:00] [INF] [127] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "10.8.1.12" closed
[2023-11-20 02:32:21.046 +01:00] [INF] [105] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "10.8.1.12" request
[2023-11-20 02:32:22.964 +01:00] [INF] [105] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Sync Requested for UserID: '"58b5c911ad634d57aff08628b156dae4"' with LastUpdateDT: '"2023-11-20T01:21:45z"'
[2023-11-20 02:32:22.979 +01:00] [INF] [105] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Added: 0, Removed: 0, Updated: 0, Changed User Data: 0
[2023-11-20 02:32:22.980 +01:00] [INF] [105] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Request Finished Taking "00:00:00.0155449"
[2023-11-20 02:33:09.139 +01:00] [INF] [121] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2023-11-20 02:33:21.139 +01:00] [INF] [91] Emby.Server.Implementations.Session.SessionWebSocketListener: Lost 1 WebSockets.
[2023-11-20 02:34:05.369 +01:00] [INF] [109] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "10.8.1.12" closed

from jellyfin-kodi.

mcarlton00 avatar mcarlton00 commented on June 6, 2024

It's probably worth noting that websockets are notoriously unstable. Any little network drop or micro interruption seems to kill the session. There's some code to attempt to reconnect in the event this happens, but it's possible it's not entirely working correctly, or it only works in some situations and fails in others.

My understanding is that the code you added shouldn't be necessary as the keepalive is handled automatically, but I may be misinformed about that. If it does have a positive effect long term I don't see any reason why it couldn't be added to the repo.

from jellyfin-kodi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.