PulseAudio crashing when opening OBS

I run JACK concurrently with Pulseaudio, with several custom audio sinks/sources which I control live using REAPER. It is an unconventional setup, and this is probably why there is a problem, but the problem still shouldn’t happen regardless.

My OBS configuration, when started, creates about 3-5 playback streams and starts recording about 5-7 sources (either through pulse or jack, same results either way).

About 1 in 4 times I start OBS, Pulseaudio crashes, which means all audio-using applications have to be restarted, including JACK and REAPER. It’s very annoying and time-wasting.

It happens much more reliably if I have bluetooth connected, and much less often if I haven’t slept the PC since booting. Regardless the recurrence is very inconsistent.

the Pulseaudio logs just say ‘too many open files’ a couple dozen times then it restarts from the socket/service. Nothing else in the logs relates to the crash but I’m happy to provide logs on request if anyone thinks any particular log would be helpful.

Seeing this error message, I tried increasing my open files ulimit. After testing, it seems to be irrelevant to the problem. Even though the number of open files far exceeded the ulimit at the time, increasing the limit to a stupid high number made no difference. Launching OBS added about 3-6k open files, where most programs open less, but not orders-of-magnitude less. When the bug occurred, my open files was around 17k.

I’m mostly asking here because I suspect there’s some simple limiter in pulseaudio I’m not aware of which is rarely relevant but which someone here might know about. Hopefully this problem is that simple to solve.

Thanks in advance.

What does the journal log show when going to sleep and coming back? Anything audio-related?

What was the output of:

cat /proc/sys/fs/file-nr

:innocent:

several custom audio sinks/sources which I control live using REAPER

I do not use Reaper, and I only recall one or two users who mentioned using it on the old forum,
so there may not be anyone on here able to assist with specific problems
The forum at linuxmusicans.com might have some people with experience of Reaper

My OBS configuration, when started, creates about 3-5 playback streams and starts recording about 5-7 sources (either through pulse or jack, same results either way)

If Reaper is controlling audio, why does OBS need so many audio streams in Pulseaudio ?

could you use some additional sub-mixes in Reaper and not need so many audio streams linking in and out of Pulseaudio?

Or use an additional/alternative package to Reaper for mixing or control of audio to OBS ?

Launching OBS added about 3-6k open files…
…my open files was around 17k

if OBS has 35% of the open files, what else has a quantity of open files that could be scaled down?

If OBS connections are reduced/simplified so JACK carries more of the load, does that reduce the amount of open files and increase stability?

much less often if I haven’t slept the PC since booting

I suggest you avoid system dropping into any standby or hibernate state whilst using JACK and Pulseaudio
on XFCE, user can turn on Presentation mode in power management to inhibit standby
Other DEs will have something based on caffeine

1 Like