-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiprocTCPBase: Example keeps breaking on InvalidActorSpecification
on my machine
#69
Comments
Thanks for the detailed information. I don't know for sure, but what I expect is happening is that an Admin is still running. In general, the multiproc bases will start an Admin as a separate process (and also a Logger) to manage the actor system; you can think of this more like a daemon or system process. This helps provide persistent actor system functionality for the more ephemeral actors, but it does have the side effect that the information in memory when the Admin was started will persist. In this case, the InvalidActorSpecification about not knowing the Hello actor is likely because there is still a MultiProcAdmin process running from your other experiments... one which was started from different sources and didn't have a I will also note that if you have the There are a couple of directions you can go from here:
asys = ActorSystem(...)
try:
actor_stuff_here
finally:
asys.shutdown()
|
Amazing! I will have at it with your suggestions and reply when I know more! |
Allright so I figured out what was going wrong: Indeed I was not properly shutting down the actor framework. It seems like killing all python processes wasnt enough as even without processes running it would still choke with the same error message. Likely this was the case because of a hardlimit of 1024 open files on my system (I found the docsection about that) and/or too many tcp connections left half open. After some rebooting and applying suggestion With the constant testing I am right now doing suggestion I can't wait to start using suggestion It might be nice adding a I thank you a lot for your answer and contribution to this project! If you like the ideas I mentioned about common pitfalls I'll gladly put in a pr, otherwise, this issue can be closed. |
I'm glad to hear you got things working, and I really appreciate the feedback! It's nice to know things work well and the documentation is useful, and I'm definitely interested in your suggestions for improvement. Would adding the "common pitfalls" to https://thespianpy.com/doc/using.html#outline-container-hH-bb3655d6-66df-42d5-9486-e81c8687e9d6 (or a subsection of that) be a good place to document those? If so, I'd welcome PR submissions to that section (https://github.com/kquick/Thespian/blob/master/doc/using.org#guidelines-for-actors-and-their-messages), or if you feel they belong elsewhere just let me know. |
Hi!
I've been playing with
multiProcTCPBase
the entire evening for a project but I have the weirdest issue with it. It seems to be tracking state accross runs somehow.I started out with the
simpleSystemBase
and for timing reasons started usingmultiProcTCPBase
. I got weird stacktraces for running simple actors running some basicwakeupAfter
logic. I gave up early as it seemed I was somehow completely borking this.After a cup of coffee I picked up the example hellogoodbye.py from this repo and every works.
I refactor code back to goal state. Sort of works. I keep cycling through normal write and build cycles. Then poof, same issue as before.
Tracking back to the example I found that it now is no longer working as well, even cross reboot.
Killing Python processes should do away with all states, no? I nuke 'em with
pkill -9
and check that there are not Python processes stuck.*Trace from running the hellogoodbye.py.
Stacktrace
It seems
hello_callable = ActorSystem().createActor(HelloCallable)
comes back with andInvalidActorSpecification
for not finding theHello
attribute on__main__
? Am I completely missing something here? Please tell me it's an 'aha' since otherwise this library is solid!Details
OS: Ubuntu 20.04
Python: Python 3.9.12
Pip: 22.0.4
Package: thespian==3.10.6
The text was updated successfully, but these errors were encountered: