troubleshooting modpy - modrpc/info GitHub Wiki
Use thr_ API.
ModPy runtime solely uses coroutines to schedule execution of multiple ModPy resources and processes. This means that non-preemptive cooperative scheduling is used. If there is any resource or process which does not yield its control, then the whole runtime can hang. A simple example:
@modpy.func
def foo():
while True:
pass
return
Currently, there is no way to exit from this hang.
Currently, there is no way to solve the hang problem. However, there are a few workarounds. For example, consider creating mutiple worker nodes and let one router node. router ModPy module contains implementation of router.