Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教造成“packet queue max”的原因分析 #208

Open
Jiaoma opened this issue May 10, 2022 · 2 comments
Open

请教造成“packet queue max”的原因分析 #208

Jiaoma opened this issue May 10, 2022 · 2 comments

Comments

@Jiaoma
Copy link

Jiaoma commented May 10, 2022

作者你好,我使用livego搭建了一个多视频通过ffmpeg推流至livego的程序,视频流比如有ffmpeg1,ffmpeg2,ffmpeg3。一个进程负责从livego拉取三个视频流处理后,再次通过ffmpeg推流到livego,流名称为test。这个进程速度可能略慢。整个程序运行一段时间后livego会报如下错误:

INFO[2022-05-10T23:09:39+08:00] HLS server enable....
INFO[2022-05-10T23:09:39+08:00] RTMP Listen On :1935
INFO[2022-05-10T23:09:39+08:00] HTTP-API listen On :8090
INFO[2022-05-10T23:09:39+08:00] HLS listen On :7002
INFO[2022-05-10T23:09:39+08:00] HTTP-FLV listen On :7001
WARN[2022-05-10T23:10:54+08:00] [<key: live/ffmpeg3, URL: /live/ffmpeg3.flv, UID: jVtIXeKQT_qTtMF3, Inter: true>] packet queue max!!!
WARN[2022-05-10T23:11:09+08:00] [<key: live/ffmpeg3, URL: /live/ffmpeg3.flv, UID: jVtIXeKQT_qTtMF3, Inter: true>] packet queue max!!!
WARN[2022-05-10T23:11:21+08:00] avc end sequence
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x4f5656]

goroutine 86 [running]:
bufio.(*Writer).Flush(0xc000569100)
        /usr/local/go/src/bufio/bufio.go:607 +0x56
bufio.(*Writer).Write(0xc000569100, {0xc002f50317, 0x437db2, 0xc00053e150})
        /usr/local/go/src/bufio/bufio.go:643 +0xd8
net/http.(*response).write(0xc000146700, 0x1738, {0xc002f50317, 0x1738, 0x38ce9}, {0x0, 0x0})
        /usr/local/go/src/net/http/server.go:1592 +0x21e
net/http.(*response).Write(0xc00025e190, {0xc002f50317, 0x7ce70, 0x3})
        /usr/local/go/src/net/http/server.go:1550 +0x30
github.com/gwuhaolin/livego/protocol/httpflv.(*FLVWriter).SendPacket(0xc00025e180)
        /home/molijuly/github/livego/protocol/httpflv/writer.go:151 +0x1d3
github.com/gwuhaolin/livego/protocol/httpflv.NewFLVWriter.func1()
        /home/molijuly/github/livego/protocol/httpflv/writer.go:55 +0x26
created by github.com/gwuhaolin/livego/protocol/httpflv.NewFLVWriter
        /home/molijuly/github/livego/protocol/httpflv/writer.go:54 +0x43c

我看记录是说其中的ffmpeg3的packet queue max。请问造成这个“packet queue max”是什么原因呢?

@gitzwt
Copy link

gitzwt commented Jul 21, 2022

遇到相同问题,livego运行一段时间后会奔溃,得重启脚本

@tzarebczan
Copy link

We are also seeing this for some streamers and it crashes the stream. What's the proper way to recover quickly or try to prevent this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants