{"action":"created","issue":{"url":"https://api.github.com/repos/foosel/OctoPrint/issues/1065","labels_url":"https://api.github.com/repos/foosel/OctoPrint/issues/1065/labels{/name}","comments_url":"https://api.github.com/repos/foosel/OctoPrint/issues/1065/comments","events_url":"https://api.github.com/repos/foosel/OctoPrint/issues/1065/events","html_url":"https://github.com/foosel/OctoPrint/issues/1065","id":107008817,"number":1065,"title":"OctoPrint becomes very sluggish (but print continues)","user":{"login":"jminardi","id":1882746,"avatar_url":"https://avatars.githubusercontent.com/u/1882746?v=3","gravatar_id":"","url":"https://api.github.com/users/jminardi","html_url":"https://github.com/jminardi","followers_url":"https://api.github.com/users/jminardi/followers","following_url":"https://api.github.com/users/jminardi/following{/other_user}","gists_url":"https://api.github.com/users/jminardi/gists{/gist_id}","starred_url":"https://api.github.com/users/jminardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jminardi/subscriptions","organizations_url":"https://api.github.com/users/jminardi/orgs","repos_url":"https://api.github.com/users/jminardi/repos","events_url":"https://api.github.com/users/jminardi/events{/privacy}","received_events_url":"https://api.github.com/users/jminardi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-17T15:20:43Z","updated_at":"2015-09-22T07:32:17Z","closed_at":null,"body":"1. What were you doing?\r\n\r\nRunning a print through the web interface\r\n\r\n2. What did you expect to happen?\r\n\r\nOctoprint to stay responsive\r\n\r\n3. What happened instead?\r\n\r\nThe interface was responsive but any request was very sluggish. (I have the request spinner plugin installed so I could see the requests hanging for minutes) The terminal tab did not show the GCode as it was streaming (the print was running though so GCode was streaming.) Reloading the page happened at the usual speed, and after reload the terminal tab would show gcode streaming for a few seconds before freezing again. Manually sending gcode did not display on the UI, but a few minutes after sending the command would actually execute on the printer. Cancel button worked after some time. A restart of the raspberry pi brought OctoPrint into normal working order.\r\n\r\n4. Branch & Commit or Version of OctoPrint:\r\n\r\nVersion: 1.2.6 (master branch)\r\n\r\n5. Printer model & used firmware incl. version\r\n   (if applicable - always include if unsure):\r\n\r\nMarlin Integration branch\r\n\r\n6. Browser and Version of Browser, Operating \r\n   System running Browser (if applicable - always \r\n   include if unsure):\r\n\r\nChrome on OS X\r\n\r\n7. Link to octoprint.log on gist.github.com or pastebin.com\r\n   (ALWAYS INCLUDE AND DO NOT TRUNCATE):\r\n\r\n```\r\n2015-09-16 15:33:17,751 - tornado.general - ERROR - Error in periodic callback\r\nTraceback (most recent call last):\r\n  File \"/home/pi/oprint/local/lib/python2.7/site-packages/sockjs_tornado-1.0.1-py2.7.egg/sockjs/tornado/periodic.py\", line 69, in _run\r\n    next_call = self.callback()\r\n  File \"/home/pi/oprint/local/lib/python2.7/site-packages/sockjs_tornado-1.0.1-py2.7.egg/sockjs/tornado/session.py\", line 409, in _heartbeat\r\n    self.handler.send_pack(proto.HEARTBEAT)\r\n  File \"/home/pi/oprint/local/lib/python2.7/site-packages/sockjs_tornado-1.0.1-py2.7.egg/sockjs/tornado/transports/websocket.py\", line 86, in send_pack\r\n    self.write_message(message, binary)\r\n  File \"/home/pi/oprint/local/lib/python2.7/site-packages/tornado-4.0.1-py2.7-linux-armv7l.egg/tornado/websocket.py\", line 201, in write_message\r\n    self.ws_connection.write_message(message, binary=binary)\r\n  File \"/home/pi/oprint/local/lib/python2.7/site-packages/tornado-4.0.1-py2.7-linux-armv7l.egg/tornado/websocket.py\", line 491, in write_message\r\n    self._write_frame(True, opcode, message)\r\n  File \"/home/pi/oprint/local/lib/python2.7/site-packages/tornado-4.0.1-py2.7-linux-armv7l.egg/tornado/websocket.py\", line 480, in _write_frame\r\n    self.stream.write(frame)\r\n  File \"/home/pi/oprint/local/lib/python2.7/site-packages/tornado-4.0.1-py2.7-linux-armv7l.egg/tornado/iostream.py\", line 348, in write\r\n    self._handle_write()\r\n  File \"/home/pi/oprint/local/lib/python2.7/site-packages/tornado-4.0.1-py2.7-linux-armv7l.egg/tornado/iostream.py\", line 801, in _handle_write\r\n    self._write_buffer.popleft()\r\nIndexError: pop from an empty deque\r\n2015-09-16 15:35:29,627 - octoprint.server.util.sockjs - INFO - New connection from client: 10.24.1.77\r\n2015-09-16 15:36:18,229 - octoprint.server.util.sockjs - INFO - Client connection closed: 10.24.1.77\r\n2015-09-16 15:36:19,600 - octoprint.server.util.sockjs - INFO - New connection from client: 10.24.1.77\r\n2015-09-16 15:37:01,018 - octoprint.server.util.sockjs - INFO - Client connection closed: 10.24.1.77\r\n2015-09-16 15:37:02,628 - octoprint.server.util.sockjs - INFO - New connection from client: 10.24.1.77\r\n2015-09-16 15:37:06,782 - octoprint.server.util.sockjs - INFO - Client connection closed: 10.24.1.77\r\n2015-09-16 15:37:08,189 - octoprint.server.util.sockjs - INFO - New connection from client: 10.24.1.77\r\n2015-09-16 15:37:10,958 - octoprint.server.util.sockjs - INFO - Client connection closed: 10.24.1.77\r\n2015-09-16 15:37:12,292 - octoprint.server.util.sockjs - INFO - New connection from client: 10.24.1.77\r\n2015-09-16 15:37:45,617 - octoprint.server.util.sockjs - INFO - Client connection closed: 10.24.1.77\r\n2015-09-16 15:37:47,030 - octoprint.server.util.sockjs - INFO - New connection from client: 10.24.1.77\r\n2015-09-16 15:38:13,371 - octoprint.server.util.sockjs - WARNING - Could not send message to client 10.24.1.72: 'utf8' codec can't decode byte 0xc5 in position 1: invalid continuation byte\r\n2015-09-16 15:38:13,374 - octoprint.server.util.sockjs - WARNING - Could not send message to client 127.0.0.1: 'utf8' codec can't decode byte 0xc5 in position 1: invalid continuation byte\r\n2015-09-16 15:38:13,376 - octoprint.server.util.sockjs - WARNING - Could not send message to client 10.24.1.77: 'utf8' codec can't decode byte 0xc5 in position 1: invalid continuation byte\r\n2015-09-16 15:38:38,639 - octoprint.filemanager.analysis - INFO - Starting analysis of local:sld_quad_11.gcode\r\n2015-09-16 15:50:26,218 - octoprint.server.util.sockjs - INFO - Client connection closed: 10.24.1.72\r\n2015-09-16 15:51:24,876 - octoprint.server.util.sockjs - INFO - New connection from client: 10.24.1.38\r\n2015-09-16 15:51:24,880 - octoprint.server.util.sockjs - WARNING - Could not send message to client 10.24.1.38: 'utf8' codec can't decode byte 0xc5 in position 1: invalid continuation byte\r\n2015-09-16 15:51:52,010 - octoprint.filemanager.analysis - INFO - Starting analysis of local:sld_quad_12.gcode\r\n2015-09-16 16:42:28,560 - octoprint.server.util.sockjs - INFO - Client connection closed: 10.24.1.77\r\n2015-09-16 17:24:56,302 - octoprint.filemanager.analysis - INFO - Starting analysis of local:sld_quad_12.gcode\r\n2015-09-16 17:51:14,500 - octoprint.server.util.sockjs - INFO - New connection from client: 10.24.1.72\r\n2015-09-16 19:40:47,872 - octoprint.server.util.sockjs - INFO - Client connection closed: 10.24.1.38\r\n2015-09-16 19:40:52,097 - octoprint.server.util.sockjs - INFO - New connection from client: 10.24.1.38\r\n2015-09-16 21:22:44,818 - octoprint.server.util.sockjs - INFO - Client connection closed: 10.24.1.38\r\n```\r\n\r\n8. Link to contents of terminal tab or serial.log on \r\n   gist.github.com or pastebin.com (if applicable - always \r\n   include if unsure or reporting communication issues AND\r\n   DO NOT TRUNCATE):\r\n\r\nNot logged - Lost after reboot\r\n\r\n9. Link to contents of Javascript console in the browser \r\n   on gist.github.com or pastebin.com or alternatively a\r\n   screenshot (if applicable - always include if unsure\r\n   or reporting UI issues):\r\n\r\nNot recorded\r\n\r\n10. Screenshot(s) showing the problem (if applicable - always\r\n    include if unsure or reporting UI issues):\r\n\r\nI have read the FAQ."},"comment":{"url":"https://api.github.com/repos/foosel/OctoPrint/issues/comments/142202232","html_url":"https://github.com/foosel/OctoPrint/issues/1065#issuecomment-142202232","issue_url":"https://api.github.com/repos/foosel/OctoPrint/issues/1065","id":142202232,"user":{"login":"foosel","id":83657,"avatar_url":"https://avatars.githubusercontent.com/u/83657?v=3","gravatar_id":"","url":"https://api.github.com/users/foosel","html_url":"https://github.com/foosel","followers_url":"https://api.github.com/users/foosel/followers","following_url":"https://api.github.com/users/foosel/following{/other_user}","gists_url":"https://api.github.com/users/foosel/gists{/gist_id}","starred_url":"https://api.github.com/users/foosel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foosel/subscriptions","organizations_url":"https://api.github.com/users/foosel/orgs","repos_url":"https://api.github.com/users/foosel/repos","events_url":"https://api.github.com/users/foosel/events{/privacy}","received_events_url":"https://api.github.com/users/foosel/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T07:32:17Z","updated_at":"2015-09-22T07:32:17Z","body":"That sounds like something in the websocket was acting up, blocking stuff on the network layer in the process. \r\n\r\nDid the starting of the observed behaviour happen along the same time the `IndexError: pop from an empty deque` stack trace in your log got produced? Is it reproducible? What was the load on the server machine when it happened?\r\n\r\nAlso please provide the full `octoprint.log` - the above one is only a truncated snippet. You might have to look at the archived/rolled over version too."}}