| View previous topic :: View next topic |
| Author |
Message |
Anonymous Guest
|
Posted: Fri Mar 30, 2007 5:15 pm Post subject: Major CPU usage with 100 listeners |
|
|
Hi there,
I'm having some challenges with Icecast 2.3-kh7. Everything has been working great until we just recently started hitting 100 listeners. When Icecast has < 100 listeners the CPU usage is around 1%, but with that extra listener the CPU consumption jumps up to 98%, the Icecast status page times out when trying to load, and no new listeners can connect to our streams.
I have spent hours Googling and looking through forums and I have been unable to find a solution to this problem. I would greatly appreciate any guidance or direction!
This is my limits section of icecast.xml:
<limits>
<clients>800</clients>
<sources>100</sources>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<burst-size>65535</burst-size>
</limits>
Our individual mount points look like this:
<mount>
<mount-name>/mountname-32k.ogg</mount-name>
<password>passwordhere</password>
<max-listener-duration>21600</max-listener-duration>
<burst-size>65536</burst-size>
<hidden>0</hidden>
<no-yp>1</no-yp>
</mount>
Icecast is being run out of a chroot and is correctly logging to access.log and error.log, however there is no information shown on this within error.log.
Has anyone else encountered this behavior? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Mar 30, 2007 7:40 pm Post subject: |
|
|
There isn't anything special about the 100 listener figure within icecast and it's not been a behaviour reported to me so far. Can you send me the error log up to the point the CPU spikes?
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Mar 30, 2007 7:47 pm Post subject: |
|
|
I turned my logging on to Debug mode and I found the following:
[2007-03-30 13:44:26] WARN connection/_accept_connection accept() failed with error 24: Too many open files
Any ideas? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Mar 30, 2007 9:01 pm Post subject: |
|
|
If on linux, check the /proc/<pid>/fd directory. The usual per-process default limit is 1024 not anything like 100. I'm guessing the busy loop is triggered when this limit is reached but hard to say at the moment.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Mon Apr 02, 2007 6:39 pm Post subject: |
|
|
Hi Karl,
Thanks for the tip! I run BSD here, so the /proc stuff didn't apply, but it did point me in the right direction. It turned out to be an issue with ulimit. By adding the following line right above my script that starts icecast I was able to increase the maximum open file limit:
ulimit -n 1024
Thanks! |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Apr 02, 2007 9:00 pm Post subject: |
|
|
what was the limit before? I'll see if I can reproduce the same busy loop here with a system limit imposed.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Mon Apr 02, 2007 11:06 pm Post subject: |
|
|
-bash-3.00$ ulimit -a |grep "open files"
open files (-n) 64
In OpenBSD the default limit is 64 open files. |
|
| Back to top |
|
 |
|