Kurento / kurento

Kurento WebRTC Media Server
Apache License 2.0
302 stars 58 forks source link

Error: Reached KMS files limit: 819 #83

Open neilyoung opened 4 weeks ago

neilyoung commented 4 weeks ago

Prerequisites

These are MANDATORY, otherwise the issue will be automatically closed.

Issue description

I'm having a KMS 6.18 source installation running on an Ubuntu 18.04 since years. From time to time it all hangs with "Error: Reached KMS files limit: 819" and only a restart helps.

The troubleshooting doc congrats me for having a custom module, which eats up file handles. I'm not aware of having such a thing, at least not one, which gets activated.

Also, the source https://doc-kurento.readthedocs.io/en/latest/user/troubleshooting.html mentions a file named /etc/default/kurento-media-server, but this seems to be not available or only available from 7.0 on.

Context

How to reproduce?

If I would know, it wouldn't bother me anymore. I just want to know, how to circumvent for now.

Expected & current behavior

(Optional) Possible solution

Info about your environment

About Kurento Media Server

Kurento Media Server version: 6.18.0 Found modules: 'core' version 6.18.0 'elements' version 6.18.0 'filters' version 6.18.0

About your Application Server

About end-user clients

Run these commands

cat /etc/lsb-release

ubuntu@prod:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"
kurento-media-server --version

Kurento Media Server version: 6.18.0
Found modules:
    'core' version 6.18.0
    'elements' version 6.18.0
    'filters' version 6.18.0
dpkg -l | grep -Pi 'kurento|kms-|gst.*1.5|nice'

no output
slabajo commented 3 weeks ago

The error message you included means that the server has reached a threshold of number of file descriptors the kurento server process can open. This may be caused by some leak on file descriptors or by a too low value set.

For the second cause you can try raising the number of file decriptors limit using ulimit -Sn but you should check periodically if the number of open file descriptors constantly raises. If it does , then probably there is some kind of leak, that is the first case I mentioned.

For the first case, the point is that the causes may vary. It may be a leak in kurento code although to be hones we haven't found that in our tests, or it may be kurento pipelines that are not correctly released so resources (including file descriptors) may be kept as in use.

According to the information you provide I see no custom module is used. If it wouldn't so, it could be a place to look for leaks. But as I say, according to your info, that is not the case.

The file you mention is the configuration for the systemd service for kurento in Debian or ubuntu systems. It is installed by default when you install kurento-media-server using standard .deb packages. It allows to set the limit of open file descriptor and other parameters