<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>I've run into some weird behaviour in pulseaudio that looks like it could be easily explained by a per user connection limit. I can't find anything in the docs to configure this though, I hope someone here knows and I've just missed something obvious.<br><div><br></div><div>I am using pulseaudio on a headless Ubuntu 8.04 server to capture and encode audio from multiple applications simultaneously. I have configured multiple null sinks, and route each application to a different sink; I then connect to the null sink monitor using the PA Simple API and encode. It works perfectly for the first few application/encoder combinations, but consistently fails to connect after a certain number with an "Access denied" error. All applications and encoders use the same user who is a member of the pulse-access group.</div><div><br></div><div>Originally using the 0.9.10 package from the Ubuntu 8.04 repositories this happened on the 23rd app/enc pair (so 64 connections), every time. Due to sound quality issues I upgraded using the 0.9.13 source, and now the connections consistently fail on the 7th app/enc pair, on connection 14. Any attempts to connect thereafter also error with "Access denied". </div><div><br></div><div>For each failed connection, the daemon writes two lines to the log:</div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>client.c: Freed 19 "Native client (UNIX socket client)"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>protocol-native.c: Connection died.</div><div><br></div><div><div>If I disconnect a few app/enc pairs I can then reconnect again back up to the limit. It really seems like a hard concurrent connection limit.</div><div><br></div></div><div><font class="Apple-style-span" color="#00000000">I tried configuring module-native-protocol-unix to allow anonymous authorisation. This let the 7th app/enc pair connect OK, but on the 8th pair (connection 15) the error "Connection terminated" is returned, and the daemon proceeds to shut himself down with no obvious reason appearing on the log. I.e.:</font></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>sink.c: Freeing sink 0 "tk1"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>source.c: Freeing source 0 "tk1.monitor"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>module.c: Unloaded "module-null-sink" (index: #0).</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>.....<br></div><div>And so on for the rest of the modules - it looks like a normal shutdown.</div><div><br></div></div><div><div>I am starting with the command:</div><div>sudo pulseaudio --system --daemonize --high-priority --log-target=syslog --disallow-module-loading=1 --log-level=debug --disallow-exit --exit-idle-time=-1</div><div><br></div><div>My default.pa/system.pa looks like:</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;">load-module module-null-sink format=s16le rate=44100 channels=2 sink_name=tk1</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;">load-module module-null-sink format=s16le rate=44100 channels=2 sink_name=tk2</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;">.....</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;">load-module module-null-sink format=s16le rate=44100 channels=2 sink_name=tk29</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;">load-module module-native-protocol-unix</span></font></div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;">Can anyone help?</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;">Regards</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;">Andrew</span></font></div></div></div></div></div></div></div></body></html>