Skip to content
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

octoprint cpu to 100% when gateway not responsive #50

Open
redPanther opened this issue Nov 26, 2021 · 2 comments
Open

octoprint cpu to 100% when gateway not responsive #50

redPanther opened this issue Nov 26, 2021 · 2 comments

Comments

@redPanther
Copy link

redPanther commented Nov 26, 2021

Hi,
in general this plugin works great. But sometimes, when the tradfri gateway is not reachable or not reactive, the tradfri plugin raises octoprint cpu to 100% and more - while not printing. When printing this is extremly anoying, because then gcode transfer is not smooth anymore and the printer begins to "stutter".

Raspi and tradfri gateway are connected via cable (no wireless )

As workaround idea, you can disable any connection attemps (e.g. for status retrieval) to gateway while printing is active

plugin version 1.7.5

@elaurijssens
Copy link

Having the same issue. When the gateway is unresponsive, one of the threads goes to 100% and the following is logged tot /var/log/syslog:

Aug  3 18:37:23 prusa3d-01 octoprint[26207]: #033[31m2022-08-03 18:37:23,133 - octoprint.plugins.ikea_tradfri - ERROR - _run_gateway_get_request(): Failed to fetch resource:#033[0m
Aug  3 18:37:23 prusa3d-01 octoprint[26207]: #033[31m2022-08-03 18:37:23,134 - octoprint.plugins.ikea_tradfri - ERROR - Retransmissions exceeded#033[0m
Aug  3 18:37:23 prusa3d-01 octoprint[26207]: #033[31m2022-08-03 18:37:23,139 - octoprint - ERROR - Exception on /plugin/ikea_tradfri/navbar/info [GET]#033[0m
Aug  3 18:37:23 prusa3d-01 octoprint[26207]: Traceback (most recent call last):
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 2077, in wsgi_app
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:     response = self.full_dispatch_request()
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1525, in full_dispatch_request
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:     rv = self.handle_user_exception(e)
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1523, in full_dispatch_request
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:     rv = self.dispatch_request()
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1509, in dispatch_request
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_ikea_tradfri/__init__.py", line 612, in navbarInfo
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:     data = self.navbarInfoData()
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_ikea_tradfri/__init__.py", line 398, in navbarInfoData
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:     state=self.getStateData()
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_ikea_tradfri/__init__.py", line 800, in getStateData
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:     res[device['id']] = self.getStateDataById(device['id'])
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_ikea_tradfri/__init__.py", line 820, in getStateDataById
Aug  3 18:37:23 prusa3d-01 octoprint[26207]:     if code in data and len(data[code]) > 0 and "5850" in data[code][0]:
Aug  3 18:37:23 prusa3d-01 octoprint[26207]: TypeError: argument of type 'NoneType' is not iterable
Aug  3 18:38:38 prusa3d-01 octoprint[26207]: #033[31m2022-08-03 18:38:38,553 - octoprint.plugins.ikea_tradfri - ERROR - _run_gateway_get_request(): Failed to fetch resource:#033[0m
Aug  3 18:38:38 prusa3d-01 octoprint[26207]: #033[31m2022-08-03 18:38:38,553 - octoprint.plugins.ikea_tradfri - ERROR - Retransmissions exceeded#033[0m
Aug  3 18:38:38 prusa3d-01 octoprint[26207]: #033[31m2022-08-03 18:38:38,557 - octoprint - ERROR - Exception on /plugin/ikea_tradfri/navbar/info [GET]#033[0m
Aug  3 18:38:38 prusa3d-01 octoprint[26207]: Traceback (most recent call last):
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 2077, in wsgi_app
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:     response = self.full_dispatch_request()
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1525, in full_dispatch_request
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:     rv = self.handle_user_exception(e)
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1523, in full_dispatch_request
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:     rv = self.dispatch_request()
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1509, in dispatch_request
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_ikea_tradfri/__init__.py", line 612, in navbarInfo
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:     data = self.navbarInfoData()
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_ikea_tradfri/__init__.py", line 398, in navbarInfoData
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:     state=self.getStateData()
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_ikea_tradfri/__init__.py", line 800, in getStateData
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:     res[device['id']] = self.getStateDataById(device['id'])
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:   File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_ikea_tradfri/__init__.py", line 820, in getStateDataById
Aug  3 18:38:38 prusa3d-01 octoprint[26207]:     if code in data and len(data[code]) > 0 and "5850" in data[code][0]:
Aug  3 18:38:38 prusa3d-01 octoprint[26207]: TypeError: argument of type 'NoneType' is not iterable

@DavyGD
Copy link

DavyGD commented Jun 11, 2024

I've got the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants