× Warning! This forum is in archival status. New contributions may not work.
Airtime stop playing for no reason
  • Vote Up0Vote Down pachapacha
    Posts: 17Member
    Hello everyone,

    I'm having an issue that I can't explain...
    Sometimes, almost every day, airtime stops and the ONAIR is getting grey
    and I loose my listeners... I need to restart airtime-liquidsoap to
    make it work again.

    This is what I have with airtime-check-system :

    AIRTIME_STATUS_URL             = http://onair.laradioparfaite.org:80/api/status/format/json/api_key/%%api_key%%
    AIRTIME_SERVER_RESPONDING      = OK
    KERNEL_VERSION                 = UNKNOWN
    MACHINE_ARCHITECTURE           = UNKNOWN
    TOTAL_MEMORY_MBYTES            = UNKNOWN
    TOTAL_SWAP_MBYTES              = UNKNOWN
    AIRTIME_VERSION                = 2.5.1
    OS                             = Debian GNU/Linux 7.10 (wheezy) x86_64
    CPU                            = Intel(R) Atom(TM) CPU  C2750  @ 2.40GHz
    WEB_SERVER                     = Apache/2.2.22 (Debian)
    PLAYOUT_ENGINE_PROCESS_ID      = 4624
    PLAYOUT_ENGINE_RUNNING_SECONDS = 923936
    PLAYOUT_ENGINE_MEM_PERC        = 0.2%
    PLAYOUT_ENGINE_CPU_PERC        = 0.0%
    LIQUIDSOAP_PROCESS_ID          = 25608
    LIQUIDSOAP_RUNNING_SECONDS     = 37734
    LIQUIDSOAP_MEM_PERC            = 0.4%
    LIQUIDSOAP_CPU_PERC            = 2.3%
    MEDIA_MONITOR_PROCESS_ID       = 322
    MEDIA_MONITOR_RUNNING_SECONDS  = 255302
    MEDIA_MONITOR_MEM_PERC         = 0.2%
    MEDIA_MONITOR_CPU_PERC         = 0.0%
    -- Your installation of Airtime looks OK!

    Is anybody has this issue ?
  • 9 Comments sorted by
  • This happen with just a vanilla instal. I have seen where they even remove the default noise in some of the new programs.

    Try one of those fallback and transistions.I wrote about especially the one about the easiest .donot try fixed it just do it.

    From the king of Liquidsoap Hack
    Lol
    Post edited by Voisses Tech at 2017-03-25 06:04:50
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down pachapacha
    Posts: 17Member
    I've installed it myself on a VPS. What are the fallbaks and transitions you're talking about ?

    I've found this in my logs when it stops :

    2017-03-25 11:54:01,958 DEBUG - [telnetliquidsoap.py : get_current_stream_id() : line 200] - dynamic_source.get_id

    2017-03-25 11:54:01,961 DEBUG - [telnetliquidsoap.py : get_current_stream_id() : line 205] - stream_id: -1
    2017-03-25 11:54:01,996 INFO - [pypoliqqueue.py : main() : line 54] - New schedule received: {u'2017-03-25-11-00-00': {u'independent_event': True, u'end': datetime.datetime(2017, 3, 25, 13, 0), u'fade_out': 500, u'show_name': u'S
    ouvenirs du festival', 'file_ready': True, u'uri': u'/mnt/data1/imported/2/unknown/unknown/unknown-2_12_Souvenirs_03_25_Beethoven_piano-unknown.flac', u'cue_in': 0, 'dst': u'/var/tmp/airtime/pypo/cache/scheduler/174.flac', u'star
    t': datetime.datetime(2017, 3, 25, 11, 0), u'replay_gain': -0.97, u'row_id': 162, u'cue_out': 7200, u'type': u'file', u'id': 174, u'fade_in': 500}, u'2017-03-25-13-00-00': {u'independent_event': True, u'end': datetime.datetime(20
    17, 3, 25, 14, 0), u'fade_out': 500, u'show_name': u'Douceurs et v\xe9rit\xe9s', 'file_ready': True, u'uri': u'/mnt/data1/imported/2/unknown/unknown/unknown-14 - Douceurs et v\xe9rit\xe9s - Sph\xe8res et dome-unknown.flac', u'cue
    _in': 0, 'dst': u'/var/tmp/airtime/pypo/cache/scheduler/209.flac', u'start': datetime.datetime(2017, 3, 25, 13, 0), u'replay_gain': -12.09, u'row_id': 164, u'cue_out': 3600, u'type': u'file', u'id': 209, u'fade_in': 500}}
    2017-03-25 11:54:01,997 INFO - [pypoliqqueue.py : main() : line 38] - waiting 358.003024s until next scheduled item

    It happens after a change is made in the library
    Post edited by pacha at 2017-03-25 09:52:51
  • 2017-03-25 11:54:01,997 INFO - [pypoliqqueue.py : main() : line 38] - waiting 358.003024s until next scheduled item

    There is the problem
    this says there is nothing schedule and nothing in the queue.
    Prevent this by doing this

    https://forum.sourcefabric.org/discussion/16909/autodj-sweetest-seen-fake-or-real-for-a-good-deal-free-free-no-unexpected-autoplay 

    gedit /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq

    Conquer the noise to suit your self like this (line 153 -155)
             
              Option1
              default = amplify(id="silence_src", 0.00001, noise()) #this is already there
             
              myplaylist= "/srv/airtime/stor/imported/"
              autodj=playlist(mode="watch","myplaylist")
            default = fallback(track_sensitive=false,[strip_blank(max_blank=180.,threshold=-45.,default),autodj])
     


    now what happen and why you should do it

    1. all of airtime uses request queue music are place in a queue and python ( /usr/lib/airtime/pypo/bin/pypoliqqueue.py) then check the queue . if the queue is empty it tells liquidsoap go to sleep I have nothing ready for you
    2. liquidsoap informs your server(shoutcast etc.) and they just go dead. to wake liquidsoap you have to restart

    note liquidsoap is like a river (stream) it needs to continuously fill to be able to inform the server

    so i put a 3 minute break if  you like test by just having these three line.I think they work withou the music but is silence

    Option2.

              default = amplify(id="silence_src", 0.00001, noise()) #this is already there
              default = fallback(track_sensitive=false,[strip_blank(max_blank=120.,threshold=-45.,default)])      


           

    it has been so long but I think if you do that liquidsoap will request again after 3minutes so if you have songs in the queue it will start feeding again

    look here /var/tmp/airtime/pypo if your songs are just cache but not queue in tmp

             
    Post edited by Voisses Tech at 2017-03-27 12:25:30
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down pachapacha
    Posts: 17Member
    Thank you for your answers and your help Voisses, I appreciate that.

    But there is something I don't understand, why liquidsoap thinks I have nothing scheduled ? Every minute of my calendar is full and there is always something to play. So I don't understand why it thinks it's not... I hope I explain well enough what's wrong  :-S

    I have 3 songs in /var/tmp/airtime/pypo/cache/scheduler but none in /var/tmp/airtime/pypo/tmp, that means they won't play ?

    I would like that airtime just plays what is scheduled, not a random file in a specific folder, I don't need airtime to do this... your code tells airtime to pickup in a specific directory instead of what's scheduled right ?
    Post edited by pacha at 2017-03-27 07:42:02
  • Vote Up0Vote Down pachapacha
    Posts: 17Member
    I'm trying something else. My theory is that is a problem of files size. In the .htaccess placed in the /usr/share/airtime/public directory there was a limit of 500M for post size and upload max size. But I uploaded a lot of files that are 1.5G without any error message. I realised that it often cutoff on large episodes. So maybe the files that are more than 500M are corrupted or something. So I changed the limit to 1500M. For now it's working, but I will wait for 2 or 3 days to be sure and I'll tell you.
  • pacha said:

    Thank you for your answers and your help Voisses, I appreciate that.

    1*
    But there is something I don't understand, why liquidsoap thinks I have nothing scheduled ? Every minute of my calendar is full and there is always something to play. So I don't understand why it thinks it's not... I hope I explain well enough what's wrong  :-S

    2*
    I have 3 songs in /var/tmp/airtime/pypo/cache/scheduler but none in /var/tmp/airtime/pypo/tmp, that means they won't play ?

    3*
    I would like that airtime just plays what is scheduled, not a random file in a specific folder, I don't need airtime to do this... your code tells airtime to pickup in a specific directory instead of what's scheduled right ?




    I have place number reference to indicate my answer.

    1.Clocks .Liquidsoap is like a bus (a physical bus) that works accurately on schedule and always on time. If when the bus get there there is no passenger it drives empty to the depot.
    So is not liquidsoap to blame its the python script that takes up the files.liquidsoap default is that files must be queue least 10 seconds before it request the file.even if there is something schedule but it came after liquidsoap made the request,it has no ti,e to wait.
    Look in your logs and you will see liquidsoap saying something like  [dummy(dot)6:3] Source failed (no more tracks) stopping output

    Now I think the first time teams recognized this and they introduce a silence noise (default) call it a mannequin so that  liquidsoap will pick it and carry it when nothing is schedule ,this however do not stop from reporting that it was empty to shut down the output and that's when it kicks off all your listener. 

    I gave you two option one with

    Option 1. Music

    Option 2. No music just your schedule make the max blank as long as you want its in seconds and the threshold the bigger the negative the more the silence have to be -25. is what the sine wave is and both are floats

    This is a manipulation to tell liquidsoap to wait .(like the driver waiting on a passenger)
    Post edited by Voisses Tech at 2017-03-27 12:33:58
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • You have done a part to fixed one aspect .
    Daniel have a post somewhere that tells you how to increased the amount of songs cache I will post it, if I found it and they had not delete it.

    I will leave these answer here that when it occurs again you will know your only solution is to manipulate the  pick up of files by having liquidsoap wait

    Option2. recommended for you
          
              default = fallback(track_sensitive=false,[strip_blank(max_blank=300.,threshold=-60.,default)])   
             
             
             
     Option1
         
              myplaylist= "/srv/airtime/stor/imported/"
              autodj=playlist(mode="watch","myplaylist")
            default = fallback(track_sensitive=false,[strip_blank(max_blank=180.,threshold=-45.,default),autodj]          
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • 3. I answered that already
    but for the brave  I used this in my program



    # my autodj definition
     autodj=.........
           
    default = fallback(track_sensitive=false,[strip_blank(max_blank=300.,threshold=-60.,default)])
          
    autodj_play = ref false
    autodj   = switch(id="autodj_switch",track_sensitive=false,[({!autodj_play},autodj),({true}, default)])

    server.register("autodj_toggle",
    fun (_)-> begin
       autodj_play := not(!autodj_play)
      "OK"
     end)     
    server.register("autodj_toggle",
    fun (_)-> begin
       autodj_play := not(!autodj_play)
      "OK"
     end)                

    # This does some key things

    • it keeps the music off
    • I use a script (js and jquery to turn it on)

    I am now looking at using the panel switch to do this  so when you slide from schedule to the right you can  turn on the autodj


    Post edited by Voisses Tech at 2017-03-27 13:01:16
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • I only place these here or us to expand our knowledge and understand and contibute
    If you do not understand a problem you cannot fix it.

    Management studies say do not spend time solving it ,break it apart and create your own even if yours have problem people will eventually like yours (old school thought)

    The scientist and the Historian say solve so that you can move on.

    Now I say this because I found a script in the version 2 .3 code that all  along show autodj but was strip from the others

    I am using it now (testing) Glad I start archiving some things cause let me assured you as they were moving to the paid model a lot of things disappear.

    I have long past using random files.

    • I select my playlist from airtime
    •  generate a m3u
    • python script pick a song from the top and
    • feed the request of liquidsoap and I extract the metadata here
    • for reporting I had to  create a database
    the new script allow me to overcome this as it push everything back to airtime ,update the database it sweet.

    I hope to release that to all 2.5.1.6  and you all going to laugh how this was easily fixed


    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.