liquidsoap - Liquidsoap 无法将数据写入主机:write() 错误中的管道损坏
问题描述
我的 Liquidsoap 音频流刚刚开始停止播放,每隔几个请求就会出现此错误消息。
Error while sending data: could not write data to host: Broken pipe in write()!
它似乎很快就会自行修复,我可以重新开始播放,但中断很烦人。
我使用的liquidsoap 脚本非常基础,可以从数据库中提取一些歌曲。
这是脚本。
def apply_metadata(m) =
title = m["title"]
artist = m["artist"]
log("Now playing: #{title} by #{artist}")
end
def apply_track(m) =
get_process_lines("curl http://localhost/api/v1/liquidsoap/playing")
log("actually playing")
end
def get_request() =
uri = list.hd(default="",get_process_lines("curl http://localhost/api/v1/liquidsoap/next"))
request.create(uri)
end
def my_safe(s) =
security = sine()
fallback(track_sensitive=false,[s,security])
end
s = request.dynamic(id="s",timeout=60.0,get_request)
s = on_metadata(apply_metadata,s)
s = on_track(apply_track,s)
s = crossfade(s)
s = my_safe(s)
# We output the stream to an icecast
# server, in ogg/vorbis format.
output.icecast(
%mp3(id3v2=true,bitrate=128,samplerate=44100),
host = "localhost",
port = 8000,
mount = "ogr",
s
)
这是liquidsoap日志。
2018/09/15 17:23:04 [lang:3] Now playing: La Sirena by Banyan
2018/09/15 17:23:17 [lang:3] actually playing
2018/09/15 17:23:17 [ogr:3] Metadata update may have failed with error: 400, Bad Request (HTTP/1.0)
2018/09/15 17:23:17 [clock.wallclock_main:2] We must catchup 13.88 seconds!
2018/09/15 17:23:17 [ogr:2] Error while sending data: could not write data to host: Broken pipe in write()!
2018/09/15 17:23:17 [ogr:3] Closing connection...
2018/09/15 17:23:17 [ogr:3] Will try to reconnect in 3.00 seconds.
2018/09/15 17:23:18 [clock.wallclock_main:2] We must catchup 7.12 seconds (we've been late for 100 rounds)!
2018/09/15 17:23:21 [ogr:3] Connecting mount ogr for source@localhost...
2018/09/15 17:23:21 [ogr:3] Connection setup was successful.
我不确定它为什么开始这样做,因为它之前已经运行了很长时间并且我没有进行任何更改。
任何建议或帮助都非常感谢,因为我对液体肥皂的理解非常基础。
谢谢。
解决方案
万一其他人在我的情况下遇到此错误消息,问题不在于液体肥皂本身,而是 API 请求花费的时间太长并且导致调度失败。
推荐阅读
- .net - 在启用了身份/身份验证的 .Net 5 的 EF Core 中播种数据时出现问题
- r - 这个 plot_normal_distribution 函数可以优化吗?
- android - .iml 文件可以在没有相应 gradle 依赖项的情况下将数据拉入项目吗?
- dapper - 简洁的一对多映射逻辑
- r - 使用重复循环的斐波那契数
- django - django 在 url 模板标签中使用引号
- ms-media-foundation - 使用 Media Foundation 编码的 AVI 索引损坏或丢失
- swift - 如何在 SwiftUI 中的所有选项卡视图之间共享状态
- python - 现在无法在 macOS Big Sur 上使用 setup.py 进行安装
- html - 内联 SVG 增加了父元素的高度 - 为什么以及如何防止它?