-
Notifications
You must be signed in to change notification settings - Fork 688
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
Cantata crashes mopidy by overwhelming mopidy's stream backend. #1762
Comments
Every MPD client I have seen before has a configurable timeout. Where is this setting in Cantana? There are many things that can take a while to complete, especially when dealing with any of the streaming services Mopidy provides. And also when Mopidy is running on a slow system (e.g. Raspberry Pi) it responds slower. I'm not convinced this is our bug. Do you actually mean Mopidy crashes? We have a configurable setting as to how many connections we accept before they are simply rejected. |
This sounds like classical resource exhaustion. Either we are busy dealing with a request that would timeout, or the actor has crashed. Then Cantata's tries again and takes an other connection/worker down, eventually they are all busy or dead. So to some degree this is Cantata's fault for possibly being too aggressive with retries. Backoff would be good to have here. And it's also Mopidy's fault for not being more resilient, and not replacing dead actors (assuming they are dying and not just busy). |
A complete debug log showing the chain of events would be handy. |
To reproduce the log, in cantata, Internet > TuneIn > By Location > Asia > South Korea > All Stations > CBS 뮤직 FM |
Ok, so this is indeed that the actors are dying and not being cleaned up. We could perhaps wrap https://github.com/mopidy/mopidy/blob/develop/mopidy/internal/network.py#L423 in a This would fix the long standing bug that this really is where you could use up |
I'm having a hard time reproducing the actual crash but I can see a problem in our handling when:
We could handle this by wrapping the |
This goes towards fixing mopidy#1762.
This goes towards fixing mopidy#1762.
This goes towards fixing mopidy#1762.
This goes towards fixing mopidy#1762.
This goes towards fixing mopidy#1762.
With #1765 merged, what more do we want to do here? |
Ideally to try again with Canata but I could never reproduce it. |
Cantata's timeout for streams is shorter than mopidy's.
Thus, cantata times out before mopidy does and makes new requests before mopidy times out.
Mopidy is overwhelmed and crashes very soon.
The text was updated successfully, but these errors were encountered: