Skip to content

Error with on_stop task with multiprocessing #133

@maurerle

Description

@maurerle

I got this message for a RoleAgent running in as_agent_process which has an on_stop handler which might have taken too long.

Stacktrace I got:

ERROR:mango.container.mp:The Send Message Task Loop has failed!
Traceback (most recent call last):
  File "/env/mango/container/mp.py", line 334, in _send_to_message_pipe
    await tx.drain()
  File "/env/mango/util/multiprocessing.py", line 184, in drain
    await self._stream_writer.drain()
  File "/env/lib/python3.12/asyncio/streams.py", line 392, in drain
    await self._protocol._drain_helper()
  File "/env/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper
    raise ConnectionResetError('Connection lost')
ConnectionResetError: Connection lost
ERROR:mango.container.mp:The Send Message Task Loop has failed!

I don't quite know how this happened, but want to document this issue.
I tried to create a minimal example, but it did not occur in there.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions