From: "Michael Ströder" <michael@stroeder.com>
To: Galene <galene@lists.galene.org>
Subject: [Galene] Re: accept4: too many open files
Date: Wed, 17 Feb 2021 15:44:44 +0100 [thread overview]
Message-ID: <195b8c5e-fbcd-89dc-1278-8973e0f21df9@stroeder.com> (raw)
In-Reply-To: <87lfbmvksw.wl-jch@irif.fr>
On 2/17/21 3:19 PM, Juliusz Chroboczek wrote:
>> In my systemd unit galene.service [1] I have this set just like for all
>> other WebRTC and TURN servers:
>
>> LimitNOFILE=65536
>
> Yes, it looks like a limit problem. Thomas, « ulimit -n 65536 » before
> starting the server.
>
> (Galène will keep retrying to establish failed media flows, so the problem
> should go away on its own when the server is less loaded. I'm not sure
> how to give the relevant feedback to the users — perhaps after 30s the
> publisher of the stream should receive a warning indicating that some
> subscriber flows couldn't be established?)
Under which circumstances does Galène free file handles?
I think monitoring is the key here. On Linux it is possible to query
/proc for available and currently used file-handles.
cat /proc/<galene-pid>/limits | grep "Max open files"
ls -1 /proc/<galene-pid>/fdinfo|wc -l
Or better let Python and module psutil calculate the free file handles
which works on any of the many OS supported by psutil:
import psutil
p=psutil.Process(<galene-pid:int>)
free_file_handles = p.rlimit(psutil.RLIMIT_NOFILE)[0] - p.num_fds()
Or any other personal favourite programming language. YMMV.
Ciao, Michael.
next prev parent reply other threads:[~2021-02-17 14:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-17 11:11 [Galene] " Thomas Gambier
2021-02-17 14:13 ` [Galene] " Michael Ströder
2021-02-17 14:19 ` Juliusz Chroboczek
2021-02-17 14:44 ` Michael Ströder [this message]
2021-02-17 16:59 ` Juliusz Chroboczek
2021-02-18 10:20 ` Thomas Gambier
2021-02-18 12:24 ` Juliusz Chroboczek
2021-02-18 13:30 ` HWJ
2021-02-18 15:05 ` Thomas Gambier
2021-02-18 17:11 ` Michael Ströder
2021-02-17 14:14 ` Toke Høiland-Jørgensen
2021-02-17 14:29 ` Juliusz Chroboczek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.galene.org/postorius/lists/galene.lists.galene.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=195b8c5e-fbcd-89dc-1278-8973e0f21df9@stroeder.com \
--to=michael@stroeder.com \
--cc=galene@lists.galene.org \
--subject='[Galene] Re: accept4: too many open files' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox