Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

what happened when max listeners is reached?

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
trogne



Joined: 09 Dec 2012
Posts: 33

PostPosted: Sun Dec 30, 2012 2:19 pm    Post subject: what happened when max listeners is reached? Reply with quote

Hi,

Suppose I have a 300 kbps upload bandwith,

and I broadcast at 50 kbps.

What happen when I reach the max listeners (6) ?

Does the radio starts lagging for everyone?
Or is it just the 7th listeners that will have problems?

Should I set a 'clients' limit in icecast config?


Patrick
Back to top
View user's profile Send private message
DJ-Zath



Joined: 11 Feb 2009
Posts: 155
Location: Western Illinois - USA

PostPosted: Sun Dec 30, 2012 9:35 pm    Post subject: Reply with quote

Hi there!

If you have a max listeners limit set in icecast <limits> tag set to 6, then the 7trh listener will receive an "unable to connect, server full" error message (example "ICY 204* - Server full") message while the current listeners will remain not effected.

BUT:

your math isn't entirely correct, I'm afraid.. as if you have 300 Kbps, you'll start to "break up" just after 4 listeners, as this doesn't account for overhead and other network traffic thats also associated with your broadcast and connection handshaking and such..

the basic rule is "no more than 2/3rds your total upload bandwidth" so that means no more than 225 of your total upstream bandwidth can be used for Icecast.

since you're set to 50 Kbps per cast, so @ 225 kbps= 4 listeners max.

I hope this helps!
_________________
-DjZ-
Smile Smile
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Dec 31, 2012 9:54 am    Post subject: Reply with quote

you may get away with 5 listeners, it is getting close and doesn't allow for much with other connections that may be running at the same time.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
trogne



Joined: 09 Dec 2012
Posts: 33

PostPosted: Mon Dec 31, 2012 1:27 pm    Post subject: Reply with quote

OK thanks.

But when there's no 'clients' limit sets,
what is happening when the limit is reached?
Does it affects all the listeners, or only the last one ?


Karl, I don't understand : "doesn't allow for much with other connections that may be running at the same time."

What do you mean?

Patrick
Back to top
View user's profile Send private message
DJ-Zath



Joined: 11 Feb 2009
Posts: 155
Location: Western Illinois - USA

PostPosted: Tue Jan 08, 2013 10:23 pm    Post subject: Reply with quote

hi there!

(sorry I didn't see an update here, or I would have replied earlier..)

in the case of this example:

if you exceed the max number of listeners that your bandwidth can support, even by one.. then all the listeners will be effected; this effect can range from latent/missing meta information to complete failure to hold a stream for any said listener(s) Usually, the effect is extreme skipping/tearing of the streams for ALL listeners, making your stream 'un-listenable'.
_________________
-DjZ-
Smile Smile
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Jan 09, 2013 2:53 am    Post subject: Reply with quote

there is always a clients limit, the default is something like 256 and no, I don't know why that figure was decided on originally. If you are getting close to your max throughput then other services could fill in the rest, so web or sql or an FTP transfer could cause streams to stall. As I said 5 is putting it close, less than that should be fine.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
superfrank



Joined: 16 Jan 2010
Posts: 14

PostPosted: Tue Jan 22, 2013 1:29 am    Post subject: Reply with quote

Code:
there is always a clients limit, the default is something like 256

As you say, my issue is that when getting about that limit users fall down, but I have a long time trying to use that option and when I try, always it reflects an error, can one of you tell me what should I did wrong in this config file?

For i.e. This one runs fine
Code:
<icecast>
   
<limits>
        <sources>2</sources>

</limits>
    <authentication>
        <source-password>xxxxxx</source-password>
        <relay-password>xxxxxxx</relay-password>
        <admin-user>admin</admin-user>
        <admin-password>xxxxxxxxx</admin-password>
   
 </authentication>

    <hostname>1.2.3.4.</hostname>
    <listen-socket>
        <port>8000</port>
  </listen-socket>
    <fileserve>1</fileserve>
    <paths>
   <logdir>./logs</logdir>
        <webroot>./web</webroot>
        <adminroot>./admin</adminroot>
        <alias source="/" dest="/status.xsl"/>
    </paths>
    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
         <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
    </logging>
</icecast>



But just by adding
Code:
 <clients>100<clients>
int the <limits> section it doesn't start Showing
Code:
"FATAL error parsing config file (./icescast.xml)"
Back to top
View user's profile Send private message
superfrank



Joined: 16 Jan 2010
Posts: 14

PostPosted: Sat Jan 26, 2013 9:35 pm    Post subject: Reply with quote

Question
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Jan 27, 2013 8:25 am    Post subject: Reply with quote

if you get the parsinig failure on the xml then the server will terminate and no listeners will get any content. set <max-listeners> in the <mount> for that stream to 5 and you should be fine, setting <clients> to 5 will affect web pages.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
trogne



Joined: 09 Dec 2012
Posts: 33

PostPosted: Mon Jan 28, 2013 1:48 pm    Post subject: Reply with quote

Hi,

What do you mean by 'affect web page' ?

In my config file, I don't set mount tags.

Do you say it is better to replace the <limits><clients>5
with <mount><max-listeners>5
?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Jan 28, 2013 9:19 pm    Post subject: Reply with quote

clients applies to all requests, so if you request /status.xsl then the browser then starts several connections at the same time for the images, css etc. it won't take many of those to reach the limit if
you set it to 5 or 6. In such cases, it would be better to to set clients higher and set max-listeners in the mount, obviously there will not be many mountpoints in such cases.


karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
trogne



Joined: 09 Dec 2012
Posts: 33

PostPosted: Mon Jan 28, 2013 9:30 pm    Post subject: Reply with quote

In icecast admin, under 'Global Server Stats', I see the total number of listeners (mount 1 + mount 2).

In icecast config, is it possible to set a max-listeners for the total of all mounts ? (instead of clients, which I see now is clearly not only listeners).
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Jan 28, 2013 11:52 pm    Post subject: Reply with quote

not currently which is why I didn't mention that.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber