Whenever I host my python script in my staging environment, always the second time onwards I am getting this ReactorNotRestartable exception. After hosting my code, first time, the code runs without any issue. but second time onwards, this below exception message is noticed and kite websocket is connected.
The execution is not even going inside on_connect event and below exception is thrown. Needed your help.
Failure Exception: ReactorNotRestartable: Stack: File "/azure-functions-host/workers/python/3.10/LINUX/X64/azure_functions_worker/dispatcher.py", line 493, in _handle__invocation_request call_result = await self._loop.run_in_executor( File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/azure-functions-host/workers/python/3.10/LINUX/X64/azure_functions_worker/dispatcher.py", line 762, in _run_sync_func return ExtensionManager.get_sync_invocation_wrapper
Repeat: the issue is occuring only from second execution after the deployment. If I Deploy the script once again, then first time there is no issue. Each time during execution, i am creating a new Kite Session.
Please understand that, first time the ticker is working as expected. In my local environment is runs perfectly always. but in my VM, it runs only for 1st time. second time onwards I have this ReactorNotRestartable exception.
I have to restart the environment to mitigate this issue. I have created a automated task to restart the function app before running, each time. Thanks for the prompt response.
Please understand that, first time the ticker is working as expected. In my local environment is runs perfectly always. but in my VM, it runs only for 1st time. second time onwards I have this ReactorNotRestartable exception.