**Description**
I've developed a service in PHP that manager a JSON playlist and return the 
next song that will be played by the icecast output on liquidsoap.

So every request in request.dynamic recives the path of a MP3 file and works as 
an autodj. I'm using AAC as format to encode files and the SSL with the mount 
point on icecast. 

Everything seems right, and works for a while, but after some time the 
liquidsoap process goes down, and I can't find anythings in logs that helped 
me, if someone has any idea what could be, I will be very grateful. 

 
**Header of Liquid**
```
#!/usr/bin/liquidsoap
set("init.force_start",true)
set("scheduler.fast_queues", 3)
set("scheduler.generic_queues", 5)

pathToSocket="/var/run/liquidsoap/socket"
set("server.socket", true)
set("server.socket.path", pathToSocket)
set("server.socket.permissions", 511)

_mntp_conf_port = "#{argv(1)}"
_cf_src_path = "/home/streaming/web/"
_cf_configs_path = "/home/streaming/configs/"

... (others paths configs initializations) ...
```

**Main Liquid script**
````
#!/usr/bin/liquidsoap
%include "lib.liq"

def get_request() =
  uri = list.hd(default="",get_process_lines("php 
#{_cf_src_path}/app/service/get_newsong.php #{_cf_port}"))
  request.create(uri,persistent=true)
end

# AutoDj 
inputAuto = 
mksafe(cue_cut(request.dynamic(id="autoplaylist",conservative=false,get_request)))
autodj = audio_to_stereo(inputAuto)

# Live Stream
liveinput = mksafe(input.https("#{_cf_live_url}",buffer=30.,max=60.))
live = audio_to_stereo(output.dummy(fallible=true, liveinput))

# Fallback
radio = fallback(track_sensitive = false, [autodj,live])
radio = mksafe(radio)

# Crossfade Config
radio = crossfade(start_next=_cf_cross_start_next,
  fade_out=_cf_cross_fade_out,
  fade_in=_cf_cross_fade_in,radio)

output.icecast(
    fallible=true,
    get_encoding_format(
      codec=_cf_codec,
      bitrate=_cf_bitrate,
      samplerate=_cf_codec_samplerate,
      audio_obj_tp=_cf_aot),
    id="radio_#{_cf_port}",
    description=_cf_desc,
    protocol="https",
    genre=_cf_genre,
    mount=_cf_mntpnt,
    host=_cf_host,
    user=_cf_user,
    port=_cf_port,
    password=_cf_pass,
    encoding = "UTF-8",
    radio)

```` 

**Ubuntu Dist. Server Details**
- DISTRIB_ID=Ubuntu
- DISTRIB_RELEASE=18.04
- DISTRIB_CODENAME=bionic
- DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"

**Memory Server Details** 
``` 
MemTotal:           3944.79      MB
MemFree:            3680.98      MB
MemAvailable:       3628.41      MB
Buffers:            14.7617      MB
Cached:             103.848      MB
SwapCached:         0            MB
Active:             156.246      MB
Inactive:           42.7695      MB
Active(anon):       80.4727      MB
Inactive(anon):     4.08594      MB
Active(file):       75.7734      MB
Inactive(file):     38.6836      MB
Unevictable:        0            MB
Mlocked:            0            MB
SwapTotal:          2048         MB
SwapFree:           2048         MB
Dirty:              0.390625     MB
Writeback:          0            MB
AnonPages:          80.4961      MB
Mapped:             73.8047      MB
Shmem:              4.16016      MB
Slab:               33.2812      MB
SReclaimable:       16.0859      MB
SUnreclaim:         17.1953      MB
KernelStack:        1.72266      MB
PageTables:         10.5273      MB
NFS_Unstable:       0            MB
Bounce:             0            MB
WritebackTmp:       0            MB
CommitLimit:        4020.39      MB
Committed_AS:       559.91       MB
VmallocTotal:       3.35544e+07  MB
VmallocUsed:        0            MB
VmallocChunk:       0            MB
HardwareCorrupted:  0            MB
AnonHugePages:      6            MB
ShmemHugePages:     0            MB
ShmemPmdMapped:     0            MB
CmaTotal:           0            MB
CmaFree:            0            MB
HugePages_Total:    0
HugePages_Free:     0
HugePages_Rsvd:     0
HugePages_Surp:     0
Hugepagesize:       2            MB
DirectMap4k:        245.859      MB
DirectMap2M:        3850         MB
DirectMap1G:        2048         MB
```
**Install method**
Everything was installed by opam 
``` 
# Packages matching: installed
# Name          # Installed # Synopsis
base            v0.11.1     Full standard library replacement for OCaml
base-bigarray   base
base-bytes      base        Bytes library distributed with the OCaml compiler
base-threads    base
base-unix       base
camomile        1.0.1       A Unicode library
conf-libpcre    1           Virtual package relying on a libpcre system 
installation
conf-m4         1           Virtual package relying on m4
conf-openssl    1           Virtual package relying on an OpenSSL system 
installation
conf-pkg-config 1.1         Virtual package relying on pkg-config installation
cppo            1.6.5       Equivalent of the C preprocessor for OCaml programs
cry             0.6.2       The cry library is an implementation of the shout 
protocol to connect to audio diffusion servers such as icecast
dtools          0.4.1       Library providing various helper functions to make 
daemons
dune            1.6.3       Fast, portable and opinionated build system
duppy           0.8.0       Library providing monadic threads
faad            0.4.0       Bindings for the faad library which provides 
functions for decoding AAC audio files
fdkaac          0.2.1       Fraunhofer FDK AAC Codec Library
flac            0.1.4       Interface for the Free Lossless Audio Codec 
otherwise known as FLAC
jbuilder        transition  This is a transition package, jbuilder is now named 
dune. Use the dune
lame            0.3.3       Bindings for the lame library which provides 
functions for encoding mp3 files
liquidsoap      1.3.6       pinned to version 1.3.6
mad             0.4.5       Bindings for the mad library which provides 
functions for encoding wave audio files into mp3
mm              0.4.0       The mm library contains high-level to create and 
manipulate multimedia streams (audio, video, MIDI)
ocaml           4.05.0      The OCaml compiler (virtual package)
ocaml-config    1           OCaml Switch Configuration
ocaml-system    4.05.0      The OCaml compiler (system version, from outside of 
opam)
ocamlfind       1.8.0       A library manager for OCaml
ogg             0.5.2       Interface for Ogg Bitstream Library, otherwise 
known as libogg
opam-depext     1.1.2       Query and install external dependencies of OPAM 
packages
opus            0.1.2       Bindings for the opus library to decode audio files 
in opus format
pcre            7.4.0       Bindings to the Perl Compatibility Regular 
Expressions library
samplerate      0.1.4       Bindings for the samplerate library which provides 
functions for changing samplerate of audio data
sexplib0        v0.11.0     Library containing the definition of S-expressions 
and some base converters
ssl             0.5.7       Bindings for OpenSSL
taglib          0.3.3       Bindings for the taglib library which provides 
functions for reading tags in headers of audio files
vorbis          0.7.1       Bindings to libvorbis
``` 
**Icecast Log Files** 

[Icecast logs (error.log and 
access.log)](https://gist.github.com/rafaelbaiolim/20945686ca0eee7b64d4531dc4e0bc1f)

**Liquidsoap 1.3.6 Log Level 5**
[Liquidsoap.log](https://gist.github.com/rafaelbaiolim/d8ecb71b3279024c08107a3790fe8f65)
 

I'm really out of ideas about this problem and really tried fix it by my self, 
so any help i will be very grateful. 




-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/savonet/liquidsoap/issues/716
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to