Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20-60 second delays in actionlib.SimpleActionClient.wait_for_server() #93

Open
lindzey opened this issue Jan 7, 2018 · 9 comments
Open

Comments

@lindzey
Copy link

lindzey commented Jan 7, 2018

(Submitted here based on a suggestion to my ROS answers question).

I am sporadically seeing actionlib’s wait_for_server() take tens of seconds to return when starting a new client node, even when the server node is already up, running, and responding to goals from other nodes.

It’s disconcerting to have this sometimes return instantly, and sometimes require up to a minute.

Is this expected? Has anybody seen this before? Does it reflect some error in how we’ve configured the system or how we're using actionlib?


We are running Indigo on Ubuntu 14.04, using the python implementation of SimpleActionClient/SimpleActionServer, and a single node implements multiple servers.

Unfortunately, I have been unable to reproduce this delay in simulation or on the bench. So far, it has only (sporadically) shown up when testing in the field. I don’t have enough samples to say for sure, but the delays might get longer the longer we’re operating. Additionally, I have not seen this the first time a client connects to the server; it seems to happen on subsequent connections.

Based on the SimpleActionClient’s and SimpleActionServer’s log files, I think the issue is that the /cancel and /goal topics aren’t connecting immediately: note the 20 second delay between 13:51:55 -> 13:52:15.

If I understand the logs, the problem was that rosmaster needed to push out updates regarding who was publishing/subscribing in order for the SimpleActionServer to properly set up inbound connections.

I’m only seeing it in this particular node, and only for inbound. (While waiting for the client to start, we used rostopic echo to create new connections on other topics.)


Here are what I think are the relevant bits of the logs:

  • Server (/motions)
  • Client (/planner) (Note that there was already another client node connected to the server at this time, on the same topics.
  • master.log (I removed +PUB, +SUB, publisherUpdate notifications for other topics, but left in all errors)
@djh329
Copy link

djh329 commented Feb 7, 2020

Was the cause of this ever discovered?

@lindzey
Copy link
Author

lindzey commented Feb 7, 2020

Not that I ever heard of. We didn't have resources at the time to dig deeper, and I'm no longer with that team.

@lindzey
Copy link
Author

lindzey commented Feb 8, 2020 via email

@guiolpei
Copy link

Any news on this?

We are experiencing the similar problem. Works perfectly in simulated environment, but delays appear when testing on real setup.

First run works without delays, but from the second time on these same delays occur.

@djh329
Copy link

djh329 commented May 21, 2020

I was able to solve this by adjusting File ULimits. I was running inside Docker. I found the solution here: moby/moby#38814

@gavanderhoorn
Copy link

@djh329: so what was the solution? Lowering or raising the limits? From some of the comments on the issue you link it seems lowering would reduce accounting delay, but issues with ulimits are typically 'solved' by raising them.

@guiolpei
Copy link

@djh329: Unfortunately we are not using Docker.

@djh329
Copy link

djh329 commented May 21, 2020

We lowered them to 1024 in our case

@guiolpei
Copy link

We were defining the SimpleActionClient inside the control loop, causing it to be created and destroyed in each execution.

We managed to solve this problem by defining it as a global variable and keeping it alive during the whole process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants