Routing Service Creating too many participants

3 posts / 0 new
Last post
Offline
Last seen: 6 years 6 months ago
Joined: 06/10/2014
Posts: 49
Routing Service Creating too many participants

Hi,

I have an application that is statically linked to routing service and I am creating routes in the application.  I can create 3 routes but when I add a 4th route I get this error:

[CREATE Participant]REDAWorkerFactory_createObjectPerWorker:!create objectPerWorker: worker factory's max. storage count reached (you may need to increase resource_limits.max_objects_per_thread value)
[CREATE Participant]PRESPsQosTable_createPartitionTable:!create worker-specific object
[CREATE Participant]DDS_DomainParticipantService_initialize:!create publish/subscribe service (participant_index collision?)
[CREATE Participant]DDS_DomainParticipant_createI:!initialize publish/subscribe service
Exception: Failed to create domain route.

I am trying to increase the Routing Service max_objects_per_thread. I added the following code to may application before creating any routes:

// increase max_object_per_thread in domain factory before creating RS Controller
DDS_DomainParticipantFactoryQos factoryQoS;
DDSTheParticipantFactory->get_qos(factoryQoS);
factoryQoS.resource_limits.max_objects_per_thread = 2048;
DDSTheParticipantFactory->set_qos(factoryQoS);

But this does not have any effect.  I can't find any way to set this in the request or domain route. Is there a way to make sure Routing Service gets this new QOS value?

(I saw that I can set max_objects_per_thread on the command line but I'm using the RS administration topics to add routes.)

Thanks,

Anne Fiore

Organization:
Fernando Garcia's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 05/18/2011
Posts: 199

Hi Anne,

According to the documentation, the SYSTEM_RESOURCE_LIMITS QoS Policy cannot be modified after the DomainParticipantFactory is used to create the first DomainParticipant or WaitSet in an application. So your problem might be that a DomainParticipant has been already created (e.g., to enable remote administration) and therefore you are not allow to modify the QoS.

If this is the case, can you try setting this QoS in your main function right before you instantiate the Routing Service object?

Thanks,
Fernando.

Offline
Last seen: 6 years 6 months ago
Joined: 06/10/2014
Posts: 49

Hi Fernando,

I moved the code to change the domain participant factory qos to the main function before any dds entities are created. However I'm still seeing this error:

[CREATE Participant]REDAWorkerFactory_createObjectPerWorker:!create objectPerWorker: worker factory's max. storage count reached (you may need to increase resource_limits.max_objects_per_thread value)

For now I am limiting the number of routes that I'm creating to workaround this. It's interesting if I run routing service as a separate process I've been able to create 5 routes (10 participants) without any problem and without needing to increase the max_objects_per_thread.  So I'm not sure what is causing this to fail when I link statically but I will look at the resource usage between the 2 use cases.

Thanks,

Anne Fiore