Events being dropped on certain machines
See original GitHub issueHi SARL team,
While running a medium-scale multi-agent system, we appear to be hitting a limit on how many events we can send at any one time on certain machines. In our multi-agent scenario, we have approximately 12 agents in a given space, and a single ‘Communicator’ agent receiving XML data from an external source once per second. This Communicator transforms the XML data into a series of different granular events and emits to the default space. As such, each second, approximately 40-60 events are being emitted.
Under these conditions, on one of our machines (Microsoft Surface Pro 4, 8GB RAM, i5 dual core processor, 256GB SSD) we begin receiving error messages stating:
[SEVERE, 7:30:03pm, null] Rejected scheduled task: io.janusproject.kernel.bic.internaleventdispatching.AgentInternalEventsDispatcher$$Lambda$18/184144855@7f917118
Here is an example screenshot showing the errors:
Having done some elementary research, we believe that the internal thread executors employed by the Janus Runtime are capped at a certain amount of active thread jobs, and we are hitting this limit. However, we are not able to find any documentation on this scenario. It is also interesting that this seems to only happen on one of our computers, despite trying scenarios on other computers with similar specs in our team with huge numbers of events being transmitted.
I am interested to know if you have hit this issue before and how you have resolved it?
Cheers, Matthew McNally
Issue Analytics
- State:
- Created 6 years ago
- Comments:28 (22 by maintainers)
Top GitHub Comments
Le 08/03/2018 à 23:49, Sebastian Sardina a écrit :
Most of the time, I create a “booting” agent. But it is possible to do from Java: the fireworks example that is embedded within the product shows how a JavaFX “start” button is used for that.
A “AgentSpawned” event is fired after the agent is initialized (after the run of its “on Initialize”, this is an example of an event that breaks the parallel execution of the event handlers while it is not finished). So that, if your booting agent waits on AgentSpawned, you are sure that the agents are spawned.
Dear @e-belghache.
According to your code, I think you are facing an initialization problem of the MAS. The spawns of the agents takes time within
Head
. Several agents are not yet launched when an agent is emiting the events. That’s why they are not receiving the events. The number of received events is then not deterministic.For solving this issue, you have to:
AgentSpawned
event withinHead