OpenBlocks

OpenBlocks

56M Downloads

Radio-Mod messes up Streamingserver

Faldrian opened this issue ยท 5 comments

commented

Hello!

I'm Faldrian from TheRadio.CC and we have a problem with your plugin. Since some month ago (to be exact: mid-february) our listener statistics exploded and icecast2 began counting crazy connections.
We investigated that matter and found your plugin (

"http://theradio.cc:8000/trcc-stream.mp3;TheRadioCC;Red",
) , but we also investigated the type of connections opened to our icecast-instance.

Situation:
Currently there are ~ 6 new connections per second, which are immediately terminated by the client. Unfortunately they are terminated in a way that our icecast-server stillt thinks there is an active connection and counts the connection towards the listener count. The TCP-handling of our server has to handle unneccesary amounts of dead connections, that are not corrently terminated.

We have made an ugly script to intercept these connections and force terminate them after they are only partially closed, removing ~30 broken connections per minute to keep our icecast-server from piling up dead connections.

What you can do / we would like you to do:

  • Improve the correct termination of connections if the radio is turned of or switched or whatever you do in your plugin to stop listening.
  • If that is not possible, please remove our stream from the config and push the new config to the people using the plugin or inform them. But we would strongly prefer that you fix your plugin to behave politely. :)

Thanks for adding us in the first place, but currently it makes us more trouble than generates interested new listeners.

Best wishes,
Faldrian

commented

I have one question @boq why didn't someone consider to add a black list webpage that they can submit their stream url. So that when a crystal is made with that url it turns to a blank crystal. Personally I loved this ability to stream in MC.

commented

Hi!

We are very sorry for that extra load, back then we were blissfully unaware of actual usage count of our mod. This behaviour is side effect of JRE's built-in HttpURLConnection implementation (which tries to reuse connections as much as possible) and quirks in Minecraft sound engine (which forces us to probe stream format before we can play it).

I'm not aware of reliable way of closing connection, but we can do some hacks to make initial connections unnecessary (i.e. hardcoding format). Though right now there are two big problems with this approach:

  • update rate for affected mod versions is quite low - we are now between two Minecraft versions and few bigger modpacks for 1.6.4 (old version, still used by about 80% of users) are already frozen (updates are slow, if any)
  • we have no ability to modify configuration already present on user's instances. We can ask people to modify config files themselves. but it will reach only small part of userbase.

We will try to fix that in new version and release fixed version for old Minecraft, but any fix it will take few months to catch up. If this is big problem for your servers, you may consider blacklisting by user agent.

Again, we are very sorry for this situation. We can't do much right now, but we will try.

commented

Thank you very much for your fast response. :)

The Connection-Close Problem ist a part of Icecast2 (there is also a bug...), the real problem is the number of connections you open (the probing) - (my technic guy said I should mention that.. :D ).

If you fix the probing in the next release, we are quite happy. :) Until then we will be able to handle the number of connections (but I wanted to inform you early, before the plugin has so many users that we have a serious problem).

commented

Radio has been removed == problem solved. Hope it wasn't that bad.

commented

why