{"action":"closed","issue":{"url":"https://api.github.com/repos/deep-compute/funcserver/issues/15","repository_url":"https://api.github.com/repos/deep-compute/funcserver","labels_url":"https://api.github.com/repos/deep-compute/funcserver/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/deep-compute/funcserver/issues/15/comments","events_url":"https://api.github.com/repos/deep-compute/funcserver/issues/15/events","html_url":"https://github.com/deep-compute/funcserver/issues/15","id":173388630,"number":15,"title":"error when too many requests are made","user":{"login":"algrebe","id":1938871,"avatar_url":"https://avatars.githubusercontent.com/u/1938871?v=3","gravatar_id":"","url":"https://api.github.com/users/algrebe","html_url":"https://github.com/algrebe","followers_url":"https://api.github.com/users/algrebe/followers","following_url":"https://api.github.com/users/algrebe/following{/other_user}","gists_url":"https://api.github.com/users/algrebe/gists{/gist_id}","starred_url":"https://api.github.com/users/algrebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algrebe/subscriptions","organizations_url":"https://api.github.com/users/algrebe/orgs","repos_url":"https://api.github.com/users/algrebe/repos","events_url":"https://api.github.com/users/algrebe/events{/privacy}","received_events_url":"https://api.github.com/users/algrebe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-26T07:36:50Z","updated_at":"2016-10-12T18:23:14Z","closed_at":"2016-10-12T18:23:14Z","body":"I get the following error when too many requests are made\r\n\r\n```\r\n(funcserver) anto@ant-Dell-n411z:/tmp$ python test.py --log-level debug --port 8888\r\n2016-08-26 13:04:21,325 DEBUG init: args=Namespace(log=None, log_level='debug', name=None, port=8888, quiet=False, statsd_server=None)\r\n2016-08-26 13:04:25,528 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 3.68ms\r\n2016-08-26 13:04:26,100 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.18ms\r\n2016-08-26 13:04:26,692 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.21ms\r\n2016-08-26 13:04:27,196 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.15ms\r\n2016-08-26 13:04:27,676 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.18ms\r\n2016-08-26 13:04:28,109 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.12ms\r\n2016-08-26 13:04:28,476 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.21ms\r\n2016-08-26 13:04:28,869 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 3.12ms\r\n2016-08-26 13:04:29,220 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.16ms\r\n2016-08-26 13:04:29,614 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.24ms\r\n2016-08-26 13:04:29,949 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.86ms\r\n2016-08-26 13:04:30,276 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.16ms\r\n2016-08-26 13:04:30,580 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.21ms\r\n2016-08-26 13:04:30,892 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.17ms\r\nException in thread Thread-15:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 810, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 763, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File \"/tmp/funcserver/funcserver/funcserver.py\", line 482, in <lambda>\r\n    th = threading.Thread(target=lambda: self._handle_call(self.request, fn, m, protocol))\r\n  File \"/tmp/funcserver/funcserver/funcserver.py\", line 444, in _handle_call\r\n    self.flush()\r\n  File \"/home/anto/.virtualenvs/funcserver/local/lib/python2.7/site-packages/tornado/web.py\", line 908, in flush\r\n    start_line, self._headers, chunk, callback=callback)\r\n  File \"/home/anto/.virtualenvs/funcserver/local/lib/python2.7/site-packages/tornado/http1connection.py\", line 399, in write_headers\r\n    self._pending_write = self.stream.write(data)\r\n  File \"/home/anto/.virtualenvs/funcserver/local/lib/python2.7/site-packages/tornado/iostream.py\", line 398, in write\r\n    self._handle_write()\r\n  File \"/home/anto/.virtualenvs/funcserver/local/lib/python2.7/site-packages/tornado/iostream.py\", line 850, in _handle_write\r\n    _merge_prefix(self._write_buffer, num_bytes)\r\n  File \"/home/anto/.virtualenvs/funcserver/local/lib/python2.7/site-packages/tornado/iostream.py\", line 1528, in _merge_prefix\r\n    if len(deque) == 1 and len(deque[0]) <= size:\r\nTypeError: object of type 'NoneType' has no len()\r\n\r\n2016-08-26 13:04:31,477 INFO 200 GET /rpc/json?fn=hello (127.0.0.1) 2.73ms\r\n\r\n```\r\n\r\n## code\r\n```python\r\nfrom gevent import monkey; monkey.patch_all = lambda : None\r\n\r\nfrom funcserver import Server\r\n\r\nclass TestAPI(object):\r\n    def __init__(self, server):\r\n        self._server = server\r\n\r\n    def hello(self):\r\n        return \"hello world\"\r\n\r\nclass TestServer(Server):\r\n    def prepare_api(self):\r\n        return TestAPI(self)\r\n\r\n    def pre_run(self):\r\n        super(TestServer, self).pre_run()\r\n\r\nif __name__ == '__main__':\r\n    TestServer().run()\r\n\r\n```\r\n\r\n## commands\r\n\r\n```\r\npython test.py --log-level debug --port 8888\r\n```\r\n\r\nI ran this command serially really fast around 15 times.\r\n```\r\ncurl http://localhost:8888/rpc/json?fn=hello\r\n```"}}
{"actor":{"display_login":"prashanthellina"}}