CPU going high 100%+

Steamcast is a stand alone server that combines the features of SHOUTcast and Icecast2 and more to make one mega awesome server.
sound selecta
Posts: 78
Joined: Tue Jan 15, 2002 4:41 am
Location: Vancouver
Contact:

CPU going high 100%+

Post by sound selecta »

I switched from MPC with mp3 to ogg to MPC mp3 and seems steamcast eats up CPU 100%+ once in a blue moon and stops responding.

This is what I saw in the tmux session but non of this if is in the log file.

Code: Select all

02/09/[email protected]:20:03] Client: Invalid Socket Too many open files 
[02/09/[email protected]:20:03] <www.steamcast.com> [/auto.mp3] NAK: Connection failed
[02/09/[email protected]:20:03] Client: Invalid Socket Too many open files 
[02/09/[email protected]:22:04] Last message repeated 60939875 times       
[02/09/[email protected]:22:04] Invalid Socket                             
[02/09/[email protected]:22:04] Client: Invalid Socket Too many open files 
[02/09/[email protected]:22:04] <www.steamcast.com> [/auto.mp3] NAK: Connection failed
[02/09/[email protected]:22:04] Client: Invalid Socket Too many open files 
[02/09/[email protected]:23:48] Last message repeated 52551250 times       
[02/09/[email protected]:23:48] Invalid Socket                             
[02/09/[email protected]:23:48] Client: Invalid Socket Too many open files 
[02/09/[email protected]:23:48] Last message repeated 1 times              
[02/09/[email protected]:23:48] <dir.xiph.org> [/auto.mp3] NAK: Connection failed
[02/09/[email protected]:23:48] Client: Invalid Socket Too many open files 
[02/09/[email protected]:24:05] Last message repeated 8560717 times        
[02/09/[email protected]:24:05] Invalid Socket                             
[02/09/[email protected]:24:05] Client: Invalid Socket Too many open files 
[02/09/[email protected]:24:05] <www.steamcast.com> [/auto.mp3] NAK: Connection failed
[02/09/[email protected]:24:05] Client: Invalid Socket Too many open files 
<Status> Sources: 1 Nodes: 0 (Unique: 0) Tx: 120.82 kbps<->0 bps^C

sound selecta
Posts: 78
Joined: Tue Jan 15, 2002 4:41 am
Location: Vancouver
Contact:

Re: CPU going high 100%+

Post by sound selecta »

Hmm just happened again. Same error messages in the tmux session.

User avatar
Jay
Will work for food (Administrator)
Posts: 2919
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Re: CPU going high 100%+

Post by Jay »

Can you send your specific encoder details?
- Jay

sound selecta
Posts: 78
Joined: Tue Jan 15, 2002 4:41 am
Location: Vancouver
Contact:

Re: CPU going high 100%+

Post by sound selecta »

Hi

This is what I got in mpd.conf

Code: Select all

# An example of a shout output (for streaming to Icecast):
#
audio_output {
        type            "shout"
        encoding        "mp3"                   # optional
        name            "Old Skool and Ragga Jungle"
        host            "ice.futureassassin.com"
        port            "8000"
        mount           "/auto.mp3"
        password        "*"
        bitrate         "128"
        format          "44100:16:2"
        protocol        "icecast2"              # optional
        user            "source"                # optional
        description     "FutureAsssassin.com Old Skool and Ragga Jungle"       # optional
        genre           "Jungle DnB"                    # optional
        public          "yes"                   # optional
        url             "http://www.futureassassin.com/"
Seems to go haywire on some tracks so maybe the encoding on the tracks is wrong? I'll try to check each tracks encoding tomorrow.

sound selecta
Posts: 78
Joined: Tue Jan 15, 2002 4:41 am
Location: Vancouver
Contact:

Re: CPU going high 100%+

Post by sound selecta »

Ok looking at some track through Kid3 I can see

Mojority of track are 128KB 44100 joint or stereo

Some are 128KB 48000

and for some kid3 doesn't shows the encoing info.

User avatar
Jay
Will work for food (Administrator)
Posts: 2919
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Re: CPU going high 100%+

Post by Jay »

Does this tool just stream the track directly to Steamcast without encoding it?
- Jay

sound selecta
Posts: 78
Joined: Tue Jan 15, 2002 4:41 am
Location: Vancouver
Contact:

Re: CPU going high 100%+

Post by sound selecta »

I believe no encoding in mp3 to mp3 since I see minimal CPU usage vs when going from mp3 to ogg. I re econded all files to 41000 and will see if it still crashes. Since it didn't when going from MP3 to OGG I guess the 48000 files where maybe causing some issues.

User avatar
Jay
Will work for food (Administrator)
Posts: 2919
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Re: CPU going high 100%+

Post by Jay »

K, will do some testing on the 48000 hz encoding.
- Jay

sound selecta
Posts: 78
Joined: Tue Jan 15, 2002 4:41 am
Location: Vancouver
Contact:

Re: CPU going high 100%+

Post by sound selecta »

I could zip up the files that I think were causing the issues if you want and pm you the link.

User avatar
Jay
Will work for food (Administrator)
Posts: 2919
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Re: CPU going high 100%+

Post by Jay »

that would be great, thanks.
- Jay

sound selecta
Posts: 78
Joined: Tue Jan 15, 2002 4:41 am
Location: Vancouver
Contact:

Re: CPU going high 100%+

Post by sound selecta »

Well sopke too soon. Just happened again but not sure how I can detect when it happens to see if its a track that is causing it or something else. It never happned when going from MP3 to OGG.

I guess I can write the tmux output to file then check when is starts to go high.

User avatar
Max
Posts: 140
Joined: Fri Oct 21, 2011 1:39 am

Re: CPU going high 100%+

Post by Max »

This issue is due to too many IO handles being open on your system.

I suggest checking ulimit if this is Linux.

sound selecta
Posts: 78
Joined: Tue Jan 15, 2002 4:41 am
Location: Vancouver
Contact:

Re: CPU going high 100%+

Post by sound selecta »

Max wrote:This issue is due to too many IO handles being open on your system.

I suggest checking ulimit if this is Linux.
Hmm thanks I'll look into it when I restart my station over the holidays. Yes this was on Ubuntu serer 12.04 I believe what I was running.

User avatar
Max
Posts: 140
Joined: Fri Oct 21, 2011 1:39 am

Re: CPU going high 100%+

Post by Max »

The new 1.0.1 release should handle this condition better. By properly warning that the system is not allowing it to open anymore IO handles.

User avatar
Max
Posts: 140
Joined: Fri Oct 21, 2011 1:39 am

Re: CPU going high 100%+

Post by Max »

Ok, I believe 1.0.2 will have fixed this problem for you. We had a Socket leak that would allow Steamcast to fail to close sockets on Linux. This has been fixed in an update build of 1.0.2 as described in the announcement.

Post Reply