multiprocTCPBase/multiprocUDPBase stuck while multiprocQueueBase runs correctly

30 views
Skip to first unread message

Anh Tran

unread,
Apr 4, 2023, 4:30:29 AM4/4/23
to thespian.py
Hi Folks,

i am creating a file parser system using the thespian framework, which includes FileManager, ParserManager (troupe), DbManager
the pseudo code is as follows,
1. create FileManager Actor
2. send a list of files to the FileManager Actor, ActorSystem().ask(file_manager, ini,)
3. start the parsing process by sending a start signal, ActorSystem().tell(file_manager, START_SIGNAL)
4. listen for the complete signal. responseMessage = ActorSystem().listen()

This workflow works well with both multiprocQueueBase and simpleSystemBase, but get stuck unless i specify the timeout parameter in .ask() and .tell().

do we have an explanation for what i am seeing?

thank for your inputs

Kevin Quick

unread,
Apr 4, 2023, 11:30:38 AM4/4/23
to Anh Tran, thespian.py
Without logs or other information it's hard to say what might be happening.

The multiprocTCPBase does have to do additional work to identify the
local network address for proper routing and listening, so it's
possible that there's an issue with Thespian interacting with your
network setup to determine this. More information on your OS type,
Thespian logs, and network configuration would help.

The other possibility is that an old multiprocTCPBase Admin is still
running... one which does not have the latest code for your
FileManager, ParserManager, or DbManager. Thespian creates an
independent process to act as the Admin for the system; this process
runs as a "daemon" in that it continues running until shutdown. All
external requests (createActor, tell, ask, etc.) are normally routed
to this Admin for delivery to the target actor (until such time as the
target actor is known externally). One effect of this is that the
Admin actor must know about the Actors it is being asked to create
(unless you use the loadable actor source feature
(https://thespianpy.com/doc/using.html#hH-955ec990-a267-4d08-8f4d-5f980c777173),
and it only knows about them in the condition they were when the Admin
was forked. If you created an Admin earlier that did not have a
(valid) definition for one of your Actors, none of your more recent
changes to those Actors will be effective until a new Admin is run.
I'd recommend during development to use the following pattern, or else
use loadable actor sources:

```
asys = ActorSystem(...)
try:
...main code...
finally:
asys.shutdown()
```

Let me know if the above helps, or if not, can you provide some
additional logging information?

Thanks,
Kevin
> --
> You received this message because you are subscribed to the Google Groups "thespian.py" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to thespianpy+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/thespianpy/75d5daba-a442-466b-86f9-1e6269872acan%40googlegroups.com.



--
-KQ

Kevin Quick

unread,
Apr 5, 2023, 11:28:56 AM4/5/23
to Anh Tran, thespian.py
Following up with the conclusion for the group: the multiprocTCPBase
works fine for Anh's needs. The multiprocUDPBase does not work
because of the size limits of UDP messages and Anh needed to send
larger messages between actors.

-Kevin
--
-KQ
Reply all
Reply to author
Forward
0 new messages