appdaemon
appdaemon copied to clipboard
Mysterious crash
Any idea what might be causing this? Source code is here
2021-06-02 11:26:51.345673 WARNING manage_kiosk_camera_popups: Unexpected error in worker for App manage_kiosk_camera_popups:
2021-06-02 11:26:51.346309 WARNING manage_kiosk_camera_popups: Worker Ags: {'id': '26de2b71db8445a7815d673cd22ceaeb', 'name': 'manage_kiosk_camera_popups', 'objectid': 'a0e0e12c51074059b6744e5595778c9e', 'type': 'scheduler', 'function': <bound method ManageKioskCameraPopups.keep_screen_on of <manage_kiosk_camera_popups.ManageKioskCameraPopups object at 0x7f11540f6610>>, 'pin_app': True, 'pin_thread': 1, 'kwargs': {'__thread_id': 'thread-1'}}
2021-06-02 11:26:51.346846 WARNING manage_kiosk_camera_popups: ------------------------------------------------------------
2021-06-02 11:26:51.347733 WARNING manage_kiosk_camera_popups: Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/appdaemon/threading.py", line 887, in worker
funcref(self.AD.sched.sanitize_timer_kwargs(app, args["kwargs"]))
File "/config/appdaemon/apps/manage_kiosk_camera_popups.py", line 250, in keep_screen_on
self.call_service("shell_command/screen_on_kindle_fire_kitchen")
File "/usr/lib/python3.8/site-packages/appdaemon/utils.py", line 195, in inner_sync_wrapper
f = run_coroutine_threadsafe(self, coro(self, *args, **kwargs))
File "/usr/lib/python3.8/site-packages/appdaemon/utils.py", line 299, in run_coroutine_threadsafe
result = future.result(self.AD.internal_function_timeout)
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 441, in result
raise TimeoutError()
concurrent.futures._base.TimeoutError
my first guess is that it is your run_in loop from 5 seconds combined with a lot of servicecalls.
Can't really think of another way of doing it. Is there something I should do differently? I thought 4 service calls every 5 seconds was fairly tame.
Based on the stack trace, it's the call service that is hanging/taking a long time - that basically equates to a REST call into Home Assistant, so could be a problem on that end or a network latency issue?