-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Regular Disconnects (sometimes precisely after 30 Minutes?) #328
Comments
That definitely shouldn't happen, mainly because there are ping/pongs going every two minutes. I am also not experiencing this playing music for 8+ hours straight. Did you make any change to the surrounding environment? Something that might be shutting down long last connections perhaps? Also the music shouldn't stop while reconnecting, but that's another issue. |
Ok, it seems even in idle, its disconnecting and reconnecting right now in regular 8 minutes and 5 seconds intervals:
This still seems to be successful in almost 100%cases |
I have also experienced a disconnect at 30 minutes when playing a track that was longer. I can try to reproduce on latest Git version if needed. ;)Frode |
Sorry for the big delay. Upon further inspecting the logs it looks like only the first occasion you report was caused by a network failure. The others report a That might have possibly been an issue with their server, but I don't think they changed the ping/pongs frequency as it's still fine for me. Are you still experiencing this issue? The 30 minutes issue is different since it may have triggered by any of the network layers between you and the Spotify server. A tcp dump would be helpful in that case, but I don't want to ask too much. The logs don't say which AP server you were connected to, that could be helpful to determine whether it's a faulty server. |
Hi, sorry for the delay.
and this is the matching tcpdump:
I can see that I am connected to aa diffrent google cloud service afterwards. |
The reconnection is made to a different host because it's randomly picked from a list. The dump looks completely fine and now I wonder whether we should be wait more before deciding that the connection hang up. I have made the "reconnection" timeout configurable (the default is now 10 seconds instead of 5). You can play around with that value and see if the problem disappears, but I think everything more than 30 seconds means there's something else wrong. |
Ok, so I looked at it again. the other lines above are actually for a different connection and don't relate.
which looks pretty legitimate? |
Ok, I can see spotify server is initiating traffic every 2 minutes before this at 11:38:05, 11:40:05 and 11:42:05 |
Exactly. The fact it decides not to send anything is unusal. You can try making the timeout a lot higher with |
I have checked running the same version of librespot-java on my laptop, I see in the tcpdump a connection every 30 seconds, 2push&2ack's, but this time its initiated by the librespot client. |
I am pretty confident that is impossible: we are listening for Ping events and sending a Pong back. The server will then respond with a PongAck which we just discard. You might be seeing some other data being transferred. |
Do you have some example data what the trace looks like at your setup? But I probably don't have the time to investigate too much in the near future :/ |
Here's some I captured. |
I also get frequent disconnects, as described. But I don't know where I can find/enable the logs. How do I get to these logs? |
You can see the librespot-java logs by using |
I used to experience this issue with NTP sync enabled, setting the following config options fixed it, might be worth a try:
|
@Ristovski where is this configured? |
ok found it |
no change for me :/ |
I have same issue, not even 3 minutes the session always reconnect. |
Describe the bug
It seems in the logs that the connection is reset after 30 minutes.
Expected behavior
I'm not sure if this is regular behaviour of not, however my music sometimes stops playing which is unfortunate.
Screenshots/Stracktraces/Logs
Also, ad night when not playing music:
Version/Commit
Release 1.5.4
The text was updated successfully, but these errors were encountered: