question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Events being dropped on certain machines

See original GitHub issue

Hi 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:

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:closed
  • Created 6 years ago
  • Comments:28 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
gallandarakhneorgcommented, Mar 9, 2018

Le 08/03/2018 à 23:49, Sebastian Sardina a écrit :

OK so who sends the ApplicationStart event? Do you send it from Java or you have like a “booting” agent?

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.

Now that I think, how does the booting agent know that all agents have truly finalized their creation? Say, if I create 10 agents and then emit ApplicationStart, maybe it is done before the 9th and 10th agent have finalized their creation (imagine a constructor that takes time)? Can this happen?

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.

1reaction
gallandarakhneorgcommented, Mar 8, 2018

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:

  1. Initialize your system by launching all agents and waiting for all the agents to be spawned (listening on AgentSpawned event withinHead
  2. When all agents are spawned, ask them to send the events.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Domino effect - Wikipedia
A domino effect or chain reaction is the cumulative effect generated when a particular event triggers a chain of similar events. This term...
Read more >
Machine Events - Deep Rock Galactic Wiki - Fandom
Introduced in Update 26: Endgame - Part 2, Machine Events are random events that can spawn inside normal Missions, providing a challenging interaction....
Read more >
Percentage of dropped events. | Download Scientific Diagram
As Europe is experiencing a second violent CoVid-19 storm, with the PCR-based testing system deteriorating due to the high volumes of people to...
Read more >
Hey fellow miners, found a machine event... aaaand drop pod ...
Machine events, cargo crates, and lost gear yet to be discovered. ... The drop pod being inbound is merely an acceptable handicap for...
Read more >
Sysmon - Sysinternals - Microsoft Learn
This event logs when a named file stream is created, and it generates events that log the hash of the contents of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found