Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.
This repository was archived by the owner on May 31, 2025. It is now read-only.

XmlRpcServer::countFreeFDs() takes too long inside docker container #1927

@wenbin1989

Description

@wenbin1989

Hi there,

We just upgrade to ROS melodic from kinetic recently, and found that node connections take too long to establish, sometimes even over 2 seconds.
Our application is very time sensitive, and this affects a lot.

After some debug, I found that the issue is caused by countFreeFDs() function in xmlrpcpp.

It's comments say:

int XmlRpcServer::countFreeFDs() {
  // NOTE(austin): this function is not free, but in a few small tests it only
  // takes about 1.2mS when querying 50k file descriptors.

But inside docker container, file descriptors number usually is 1048576:

$ python -c "import resource; print(resource.getrlimit(resource.RLIMIT_NOFILE))"
(1048576, 1048576)

that takes a huge time to query.

docker version we are using is

$ docker --version
Docker version 19.03.5, build 633a0ea838

Any idea how to fix this? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions