How to change QoS resource_limits.max_objects_per_thread value

5 posts / 0 new
Last post
Offline
Last seen: 2 months 2 weeks ago
Joined: 08/25/2020
Posts: 5
How to change QoS resource_limits.max_objects_per_thread value

Hi, I have a relatively straight forward question. Basically, I am running out of resources on my thread when I try to create more participants in Web Integration Service. Specifically, I am sending a remote request to Web Integration Service to add a new participant. But then I get this error. 

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

I think I need to update the QoS file, but I'm not sure on the syntax. Here's what the QoS part of RTI_WEB_INTEGRATION_SERVICE.xml looks like now(With ascii equivalent underneath):

<!-- Default QoS settings are defined under DefaultQosProfile. By default
all the entities will take this configuration. -->
<qos_library name="DefaultQosLib">
<qos_profile name="DefaultQosProfile"
is_default_qos="true">
<datareader_qos>
<!-- This property lets the readers be matched
with both XCDR and XCDR2 DataWriters. -->
<representation>
<value>
<element>XCDR_DATA_REPRESENTATION</element>
<element>XCDR2_DATA_REPRESENTATION</element>
</value>
</representation>
</datareader_qos>
<datawriter_qos>
<history>
<kind>KEEP_ALL_HISTORY_QOS</kind>
</history>
</datawriter_qos>
<participant_qos>
<database>
<shutdown_cleanup_period>
<sec>0</sec>
<nanosec>100000000</nanosec>
</shutdown_cleanup_period>
</database>
</participant_qos>
</qos_profile>

<qos_profile name="MonitoringLib"
base_name="BuiltinQosLib::Generic.Monitoring.Common">
</qos_profile>
</qos_library>

My question is what would I need to change? and what would the syntax be? Thank you!

matt's picture
Offline
Last seen: 5 days 15 hours ago
Joined: 09/29/2020
Posts: 1

Hello Jacob,

It is not possible to change the value of max_objects_per_thread in a QoS XML file, but there is a command-line parameter that can be passed to the Web Integration Service on startup. The parameter is -maxObjectsPerThread and it takes an integer value. As an approximation, you should expect to increase this value by 1024 for each additional 10 participants being created.  Full documentation of the Web Integration Service command-line parameters is available here.

Regards,

Matt

 

Howard's picture
Offline
Last seen: 2 days 14 hours ago
Joined: 11/29/2012
Posts: 130

So, how many DomainParticipants are you creating in WIS?  And why?  Hopefully, you're not creating more than one participant per Domain ID.  While sometimes there are valid reasons for doing so, for most of the time, a single participant is all that's needed.

DomainParticipants are heavy weight objects to create...they take up lots of resources, memory, semaphores, shared memory, sockets, threads...not to mention add to the discovery traffic load.  If the WIS needs to communicate on different domain IDs, then yes, each unique domain id will require a different participant.

 

Offline
Last seen: 2 months 2 weeks ago
Joined: 08/25/2020
Posts: 5

Thank you for the info. I wasn't aware that it's good practice to make only one participant for the whole domain. I was making a new participant for every publisher. It sounds like there is a better way. I will give this try. I'll let you know how it goes. Thank you!

Offline
Last seen: 2 months 2 weeks ago
Joined: 08/25/2020
Posts: 5

Everything worked well when I switched over to one participant. Now I don't need to change the max objects per thread value. Thank you!