# Slow startup of multiple PX4 SITL instances with Micro XRCE-DDS Agent (multi-drone setup)

**URL:** <https://discuss.px4.io/t/slow-startup-of-multiple-px4-sitl-instances-with-micro-xrce-dds-agent-multi-drone-setup/47532>\
**Category:** PX4 Autopilot\
**Created:** [September 27, 2025, 9:03pm UTC](https://discuss.px4.io/t/slow-startup-of-multiple-px4-sitl-instances-with-micro-xrce-dds-agent-multi-drone-setup/47532 "2025-09-27T21:03:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raydn87](https://discuss.px4.io/user_avatar/discuss.px4.io/raydn87/32/20380_2.png) [@Raydn87](https://discuss.px4.io/u/Raydn87)\
**Post date:** [September 27, 2025, 9:03pm UTC](https://discuss.px4.io/t/slow-startup-of-multiple-px4-sitl-instances-with-micro-xrce-dds-agent-multi-drone-setup/47532/1 "2025-09-27T21:03:52Z")

</div>

I am working with **PX4 in SITL** and **Micro XRCE-DDS Agent** to simulate multiple drones simultaneously in Gazebo. The procedure is straightforward: I start the agent on port 8888 and, in separate terminals, I launch each PX4 instance with its own identifier (`-i 1`, `-i 2`, etc.) but using the same `PX4_SYS_AUTOSTART=4001` since all drones are standard multicopters.

What I observe is the following: the **first drone** starts up fairly quickly, and in the agent’s terminal I immediately see the client creation and session establishment. After that, there is a flood of messages about topic, publisher, and subscriber creation, which I understand corresponds to the full uORB ↔ DDS mapping that PX4 enables by default. The issue appears when I launch the **second drone** : while the first one is still busy creating DDS entities, the second one takes a long time to establish its session. Sometimes this delay can be tens of seconds, and by the time all drones are running, the full startup process can take up to 20 minutes.

I have verified that this is not caused by external network blocking: the agent is running on localhost, port 8888 is open, and I have tested both UDP and TCP. I also avoid running PX4 with `sudo` to prevent permission issues with sockets under `/tmp`. In the logs, I see the MAVLink message saying it only broadcasts on localhost, but I believe this should not affect XRCE.

From what I can deduce, the bottleneck lies in the **massive creation of DDS entities by PX4** : while one instance is in that process, the others remain waiting before they can establish their connection. What I would like to know is whether this behavior is normal in multi-drone scenarios and, more importantly, if there is a way to **reduce these startup times** — for example, by limiting the published topics, using minimal XRCE profiles, or configuring entity creation differently so that new clients are not blocked.

---

<div class="post-metadata">

**Author:** ![system](https://discuss.px4.io/uploads/default/original/3X/7/3/73ce918bdcd64854de904f0c8d9ab70ca9723f2a.png) [@system](https://discuss.px4.io/u/system)\
**Post date:** [December 26, 2025, 9:04pm UTC](https://discuss.px4.io/t/slow-startup-of-multiple-px4-sitl-instances-with-micro-xrce-dds-agent-multi-drone-setup/47532/2 "2025-12-26T21:04:44Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
