Hello Everyone! I'm using the livekit egress to re...
# egress
a
Hello Everyone! I'm using the livekit egress to record the tracks and save the media to s3. The setup is pretty simple running on a server deployed with docker compose, along with livekit and other components. Every 2-3 days, I get this error, which im not understanding how to approach this
egress-1  | 2025-11-22T05:32:57.508Z	WARN	egress	pulse/pactl.go:15	failed to list pulse info	{"nodeID": "NE_rYgiMXcNm6es", "handlerID": "EGH_t3iQjvSaL3S6", "clusterID": "", "egressID": "EG_6oYBKPa2y3V3", "error": "Connection failure: Connection terminated\n"}
egress-1  | 2025-11-22T05:32:57.512Z	INFO	egress	medialogutils/cmd.go:36	pactl: Connection failure: Connection terminated
egress-1  | 	{"nodeID": "NE_rYgiMXcNm6es", "handlerID": "EGH_t3iQjvSaL3S6", "clusterID": "", "egressID": "EG_6oYBKPa2y3V3"}
egress-1  | 2025-11-22T05:32:57.512Z	INFO	egress	medialogutils/cmd.go:36	pactl: 	{"nodeID": "NE_rYgiMXcNm6es", "handlerID": "EGH_t3iQjvSaL3S6", "clusterID": "", "egressID": "EG_6oYBKPa2y3V3"}
egress-1  | 2025-11-22T05:32:57.512Z	ERROR	egress	medialogutils/cmd.go:63	2025-11-22T05:32:57.512Z	ERROR	egress	source/web.go:79	failed to create pulse sink	{"nodeID": "NE_rYgiMXcNm6es", "handlerID": "EGH_t3iQjvSaL3S6", "clusterID": "", "egressID": "EG_6oYBKPa2y3V3", "error": "failed to launch pulse: exit status 1"}
After this, the egress container starts draining and the service get unavailable for time being till it get recovered back. Any help is appreciated! I will also provide the full error in the thread
Copy code
egress-1  | 2025-11-22T05:32:57.508Z    WARN    egress  pulse/pactl.go:15   failed to list pulse info   {"nodeID": "NE_rYgiMXcNm6es", "handlerID": "EGH_t3iQjvSaL3S6", "clusterID": "", "egressID": "EG_6oYBKPa2y3V3", "error": "Connection failure: Connection terminated\n"}
egress-1  | 2025-11-22T05:32:57.512Z    INFO    egress  medialogutils/cmd.go:36 pactl: Connection failure: Connection terminated
egress-1  |     {"nodeID": "NE_rYgiMXcNm6es", "handlerID": "EGH_t3iQjvSaL3S6", "clusterID": "", "egressID": "EG_6oYBKPa2y3V3"}
egress-1  | 2025-11-22T05:32:57.512Z    INFO    egress  medialogutils/cmd.go:36 pactl:  {"nodeID": "NE_rYgiMXcNm6es", "handlerID": "EGH_t3iQjvSaL3S6", "clusterID": "", "egressID": "EG_6oYBKPa2y3V3"}
egress-1  | 2025-11-22T05:32:57.512Z    ERROR   egress  medialogutils/cmd.go:63 2025-11-22T05:32:57.512Z    ERROR   egress  source/web.go:79    failed to create pulse sink {"nodeID": "NE_rYgiMXcNm6es", "handlerID": "EGH_t3iQjvSaL3S6", "clusterID": "", "egressID": "EG_6oYBKPa2y3V3", "error": "failed to launch pulse: exit status 1"}
egress-1  | <http://github.com/livekit/egress/pkg/pipeline/source.NewWebSource|github.com/livekit/egress/pkg/pipeline/source.NewWebSource>
egress-1  |     /workspace/pkg/pipeline/source/web.go:79
egress-1  | <http://github.com/livekit/egress/pkg/pipeline/source.New|github.com/livekit/egress/pkg/pipeline/source.New>
egress-1  |     /workspace/pkg/pipeline/source/source.go:37
egress-1  | <http://github.com/livekit/egress/pkg/pipeline.New|github.com/livekit/egress/pkg/pipeline.New>
egress-1  |     /workspace/pkg/pipeline/controller.go:100
egress-1  | <http://github.com/livekit/egress/pkg/handler.(*Handler).Run|github.com/livekit/egress/pkg/handler.(*Handler).Run>
egress-1  |     /workspace/pkg/handler/handler.go:94
egress-1  | main.runHandler
egress-1  |     /workspace/cmd/server/main.go:208
egress-1  | <http://github.com/urfave/cli/v2.(*Command).Run|github.com/urfave/cli/v2.(*Command).Run>
egress-1  |     /root/go/pkg/mod/github.com/urfave/cli/v2@v2.27.5/command.go:276
egress-1  | <http://github.com/urfave/cli/v2.(*Command).Run|github.com/urfave/cli/v2.(*Command).Run>
egress-1  |     /root/go/pkg/mod/github.com/urfave/cli/v2@v2.27.5/command.go:269
egress-1  | <http://github.com/urfave/cli/v2.(*App).RunContext|github.com/urfave/cli/v2.(*App).RunContext>
egress-1  |     /root/go/pkg/mod/github.com/urfave/cli/v2@v2.27.5/app.go:333
egress-1  | <http://github.com/urfave/cli/v2.(*App).Run|github.com/urfave/cli/v2.(*App).Run>
egress-1  |     /root/go/pkg/mod/github.com/urfave/cli/v2@v2.27.5/app.go:307
egress-1  | main.main
egress-1  |     /workspace/cmd/server/main.go:83
egress-1  | runtime.main
egress-1  |     /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.1.linux-amd64/src/runtime/proc.go:272
egress-1  |     {"nodeID": "NE_rYgiMXcNm6es", "clusterID": "", "handlerID": "EGH_t3iQjvSaL3S6", "egressID": "EG_6oYBKPa2y3V3"}
egress-1  | <http://github.com/livekit/protocol/logger/medialogutils.(*HandlerLogger).Write|github.com/livekit/protocol/logger/medialogutils.(*HandlerLogger).Write>
egress-1  |     /root/go/pkg/mod/github.com/livekit/protocol@v1.34.1-0.20250303024358-b007d0efe442/logger/medialogutils/cmd.go:63
egress-1  | io.copyBuffer
egress-1  |     /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.1.linux-amd64/src/io/io.go:431
egress-1  | io.Copy
egress-1  |     /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.1.linux-amd64/src/io/io.go:388
egress-1  | os.genericWriteTo
egress-1  |     /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.1.linux-amd64/src/os/file.go:275
egress-1  | os.(*File).WriteTo
egress-1  |     /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.1.linux-amd64/src/os/file.go:253
egress-1  | io.copyBuffer
egress-1  |     /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.1.linux-amd64/src/io/io.go:411
egress-1  | io.Copy
egress-1  |     /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.1.linux-amd64/src/io/io.go:388
egress-1  | os/exec.(*Cmd).writerDescriptor.func1
egress-1  |     /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.1.linux-amd64/src/os/exec/exec.go:580
egress-1  | os/exec.(*Cmd).Start.func2
egress-1  |     /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.1.linux-amd64/src/os/exec/exec.go:733
egress-1  | 2025-11-22T05:32:57.513Z    ERROR   egress  server/server_ipc.go:43 internal error, shutting down   {"nodeID": "NE_rYgiMXcNm6es", "clusterID": "", "error": "failed to launch pulse: exit status 1"}
egress-1  | <http://github.com/livekit/egress/pkg/server.(*Server).HandlerUpdate|github.com/livekit/egress/pkg/server.(*Server).HandlerUpdate>
egress-1  |     /workspace/pkg/server/server_ipc.go:43
egress-1  | <http://github.com/livekit/egress/pkg/ipc._EgressService_HandlerUpdate_Handler|github.com/livekit/egress/pkg/ipc._EgressService_HandlerUpdate_Handler>
egress-1  |     /workspace/pkg/ipc/ipc_grpc.pb.go:147
egress-1  | <http://google.golang.org/grpc.(*Server).processUnaryRPC|google.golang.org/grpc.(*Server).processUnaryRPC>
egress-1  |     /root/go/pkg/mod/google.golang.org/grpc@v1.70.0/server.go:1400
egress-1  | <http://google.golang.org/grpc.(*Server).handleStream|google.golang.org/grpc.(*Server).handleStream>
egress-1  |     /root/go/pkg/mod/google.golang.org/grpc@v1.70.0/server.go:1810
egress-1  | <http://google.golang.org/grpc.(*Server).serveStreams.func2.1|google.golang.org/grpc.(*Server).serveStreams.func2.1>
egress-1  |     /root/go/pkg/mod/google.golang.org/grpc@v1.70.0/server.go:1030
egress-1  | 2025-11-22T05:32:57.513Z    INFO    egress  server/server.go:150    draining    {"nodeID": "NE_rYgiMXcNm6es", "clusterID": ""}
After this, the worker waits for completing the other recordings to get completing, and then it finally drained and restarts, and start recieving further requests.
c
Hey @adorable-queen-87583 - based on logs, I think you re hitting this: https://github.com/livekit/egress/issues/999#issuecomment-3424591086
are you recording audio only? which egress version do you use?
a
Im using the livekit/egress:latest image, also we are recording videos as well, not just audio only. If this is the limitation of pulse audio, how can we over come this. Can I run more replicas of the egress container from the docker compose, will that can help?? @clever-nail-49292
c
yes - that will the way to go
a
Is there any limit on how many recording I can do, I was not able to find the limit @clever-nail-49292
a
Thanks @clever-nail-49292 For now I have added more replica, hope that works. I'll keep it in observation for time being. Thanks for the tip for the limit, and I can use this information to design it in better way.
👍 1