× Warning! This forum is in archival status. New contributions may not work.
excessive CPU usage (airtime-liquids & silan)
  • Vote Up0Vote Down charoscharos
    Posts: 20Member
    Airtime 2.3 is idle for about a week now, but somehow I got the following email from provider:

    "We have stopped your VPS container due to excessive CPU usage.



    Details of the processes are as follows:



    51648 526 airtime-liquids 101.11% CPU

    150265 526 silan 105.54% CPU"

    Worth mentioning that for 4months, everything was working fine with no hiccups. So this is a rare occasion. Still, I'm posting it in case someone else had similar issue or it's just me and a one time minor issue.
  • 14 Comments sorted by
  • Hi, i had the same problem with a dedicated server. I looked into pypo.log and found "http://ksxx650.kimsufi.com:80/api/get-files-without-silan-value/api_key/xxx-mykey-xxx".
    Called the URL with my browser gave me this

    [{"id":3063,"fp":"\/home\/airtime\/music\/Ballads\/Only You\/15-Billy Paul  Let  Em In.mp3"},
    {"id":2492,"fp":"\/home\/airtime\/music\/Ballads\/Only You\/10-Melanie  Ruby Tuesday.mp3"},
    {"id":2956,"fp":"\/home\/airtime\/music\/Ballads\/Only You\/13-The Three Degrees  A Toast Of Love.mp3"}]

    I opened my databas and set in  table cc_files row silan_check to TRUE for these three files. Then the load and cpu usage went back to normal values.

  • So, the problem is with VBR files and Silan... Tricky
  • Vote Up1Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    sudo -u postgres psql -c "update cc_files set silan_check='t' where file_exists='t' and silan_check='f'" airtime

    Please run it in terminal and pay attention it's for Postgresql, Airtime default database.
    Cloud Radio -> http://airtime.pro
  • Maybe your VPS service tier or provider itself isn't up to snuff? Be sure to try Liquidsoap 1.1.1 and one of the latest Airtime releases, too. Many major bugs have been squashed recently, especially in LS.
  • I had a similar problem with silan taking a lot of CPU, weirdly it seemed to be monit & maybe permissions causing the issue - check media monitor.
  • I had the same issue with my VPS around the same time. Wish I had known there was a reason I ended up upgrading my server : (
  • Now i've found the issue on my files. This files were encoded in mp3 VBR. silan couldn't find the correct duration. The duration on this files had a negative value like "-15.457683". i reencoded the files with Audacity as mp3 with CBR (Constant Bitrate). Now silan get right values from the files and everythings working fine now.
    :D
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    @Helmut,
    Any chance could you upload that file? It would be helpful to fix the problem permanently.
    Cloud Radio -> http://airtime.pro
  • Here is one file. I'll send you the password in a private message.
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    Thank you, confirmed that file cause silan failure, will submit ticket to silan.
    Cloud Radio -> http://airtime.pro
  • I have had a similar issue with silan and 2.3 - and I use VBR. Kind of solved it with Martin's help, (search on here) and I thought a fix was in 2.4 because of my issues I think they found a bug, but then I've noticed on 2.4 that silan sometimes goes back to 80-90% CPU at times?

    Luckily that VPS host doesn't seem to complain about CPU like they did...
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    Silan is setting to caculate every 5 mins, usually it would be ok because all file will be marked as checked after several rounds.  It will consume more cpu we it's complain some files are causing exception. Because those files are calculated again and again but never finished.

    Currently the workaround is to mark those files in cc_files table as silan_check='t'. We have submit ticket to silan with the file samples. 
    Cloud Radio -> http://airtime.pro
  • Vote Up0Vote Down charoscharos
    Posts: 20Member
    can anyone share the sqlite command to batch all files in cc_files tables as silan_check true ? I think I got dozens of vbr files .
  • Vote Up0Vote Down charoscharos
    Posts: 20Member
    can anyone share the sqlite command to batch all files in cc_files tables as silan_check true ? I think I got dozens of vbr files .