librdkafka icon indicating copy to clipboard operation
librdkafka copied to clipboard

Too many open files

Open MiladR76 opened this issue 2 years ago • 0 comments

Description

I am working on a Rtsp client project. In this project, my client code recieves data from mutiple Rtsp servers. I have a wrapper class. In the constructor of this class, I call rd_kafka_new() function, and then, manage the rd_kafka instance. For each Rtsp server, I create a new instance of my class. I have 85 instances of this class, and when I create another instance of my class (now I have 86 instances), I get "too many open files" error from rd_kafka logs. When I check the number of file descriptors of the program, It is about 1050 descriptors.

My guess is that rd_kafka uses select() function, and this causes the problem. Am I right?

Checklist

Please provide the following information:

  • librdkafka version: v1.9.2
  • Apache Kafka version: unknown
  • librdkafka client configuration: message.timeout.ms=2000
  • Operating system: Ubuntu 20.04
  • Provide logs: Too many open files
  • Provide broker log excerpts: unknown

MiladR76 avatar Dec 25 '22 19:12 MiladR76