{"action":"created","issue":{"url":"https://api.github.com/repos/neo4j/neo4j-python-driver/issues/196","repository_url":"https://api.github.com/repos/neo4j/neo4j-python-driver","labels_url":"https://api.github.com/repos/neo4j/neo4j-python-driver/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/neo4j/neo4j-python-driver/issues/196/comments","events_url":"https://api.github.com/repos/neo4j/neo4j-python-driver/issues/196/events","html_url":"https://github.com/neo4j/neo4j-python-driver/issues/196","id":275187733,"number":196,"title":"Connection keeps getting reset with UWSGI-NGINX","user":{"login":"rdhara","id":12704053,"avatar_url":"https://avatars2.githubusercontent.com/u/12704053?v=4","gravatar_id":"","url":"https://api.github.com/users/rdhara","html_url":"https://github.com/rdhara","followers_url":"https://api.github.com/users/rdhara/followers","following_url":"https://api.github.com/users/rdhara/following{/other_user}","gists_url":"https://api.github.com/users/rdhara/gists{/gist_id}","starred_url":"https://api.github.com/users/rdhara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdhara/subscriptions","organizations_url":"https://api.github.com/users/rdhara/orgs","repos_url":"https://api.github.com/users/rdhara/repos","events_url":"https://api.github.com/users/rdhara/events{/privacy}","received_events_url":"https://api.github.com/users/rdhara/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-11-19T20:07:54Z","updated_at":"2017-12-20T07:30:53Z","closed_at":"2017-12-14T09:22:08Z","author_association":"NONE","body":"Hello,\r\n\r\nI've been struggling with this issue for weeks. It seems the driver keeps resetting connections to my web app. I keep getting this error seemingly randomly when I try to make requests using the driver from a Flask app using UWSGI and NGINX:\r\n```\r\nNov 19 13:08:44 ip-172-31-15-241 uwsgi[22867]: Exception ignored in: 'neo4j.bolt._io.ChunkedInputBuffer.receive'\r\nNov 19 13:08:44 ip-172-31-15-241 uwsgi[22867]: Traceback (most recent call last):\r\nNov 19 13:08:44 ip-172-31-15-241 uwsgi[22867]:   File \"/usr/lib/python3.5/ssl.py\", line 929, in recv_into\r\nNov 19 13:08:44 ip-172-31-15-241 uwsgi[22867]:     return self.read(nbytes, buffer)\r\nNov 19 13:08:44 ip-172-31-15-241 uwsgi[22867]:   File \"/usr/lib/python3.5/ssl.py\", line 791, in read\r\nNov 19 13:08:44 ip-172-31-15-241 uwsgi[22867]:     return self._sslobj.read(len, buffer)\r\nNov 19 13:08:44 ip-172-31-15-241 uwsgi[22867]:   File \"/usr/lib/python3.5/ssl.py\", line 575, in read\r\nNov 19 13:08:44 ip-172-31-15-241 uwsgi[22867]:     v = self._sslobj.read(len, buffer)\r\nNov 19 13:08:44 ip-172-31-15-241 uwsgi[22867]: ConnectionResetError: [Errno 104] Connection reset by peer\r\n```\r\n\r\nThis causes the whole application to hang but will clear itself up after some time. I can post additional logs from NGINX if it will be helpful in solving the issue. Please let me know if you have any ideas!"},"comment":{"url":"https://api.github.com/repos/neo4j/neo4j-python-driver/issues/comments/352986925","html_url":"https://github.com/neo4j/neo4j-python-driver/issues/196#issuecomment-352986925","issue_url":"https://api.github.com/repos/neo4j/neo4j-python-driver/issues/196","id":352986925,"user":{"login":"iwarin","id":11299423,"avatar_url":"https://avatars2.githubusercontent.com/u/11299423?v=4","gravatar_id":"","url":"https://api.github.com/users/iwarin","html_url":"https://github.com/iwarin","followers_url":"https://api.github.com/users/iwarin/followers","following_url":"https://api.github.com/users/iwarin/following{/other_user}","gists_url":"https://api.github.com/users/iwarin/gists{/gist_id}","starred_url":"https://api.github.com/users/iwarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwarin/subscriptions","organizations_url":"https://api.github.com/users/iwarin/orgs","repos_url":"https://api.github.com/users/iwarin/repos","events_url":"https://api.github.com/users/iwarin/events{/privacy}","received_events_url":"https://api.github.com/users/iwarin/received_events","type":"User","site_admin":false},"created_at":"2017-12-20T07:30:53Z","updated_at":"2017-12-20T07:30:53Z","author_association":"NONE","body":"I'm running into this problem as well.\r\n\r\n```Exception ignored in: 'neo4j.bolt._io.ChunkedInputBuffer.receive'\r\nTraceback (most recent call last):\r\nFile \"/usr/local/lib/python3.6/ssl.py\", line 1002, in recv_into\r\nreturn self.read(nbytes, buffer)\r\nFile \"/usr/local/lib/python3.6/ssl.py\", line 865, in read\r\nreturn self._sslobj.read(len, buffer)\r\nFile \"/usr/local/lib/python3.6/ssl.py\", line 625, in read\r\nv = self._sslobj.read(len, buffer)\r\nConnectionResetError: [Errno 104] Connection reset by peer\r\n[2017-12-19 07:15:40,172] ERROR in app: Exception on /api/v1/customer [GET]\r\nTraceback (most recent call last):\r\nFile \"/usr/local/lib/python3.6/site-packages/flask/app.py\", line 1982, in wsgi_app\r\nresponse = self.full_dispatch_request()\r\nFile \"/usr/local/lib/python3.6/site-packages/flask/app.py\", line 1614, in full_dispatch_request\r\nrv = self.handle_user_exception(e)\r\nFile \"/usr/local/lib/python3.6/site-packages/flask_cors/extension.py\", line 161, in wrapped_function\r\nreturn cors_after_request(app.make_response(f(*args, **kwargs)))\r\nFile \"/usr/local/lib/python3.6/site-packages/flask/app.py\", line 1517, in handle_user_exception\r\nreraise(exc_type, exc_value, tb)\r\nFile \"/usr/local/lib/python3.6/site-packages/flask/_compat.py\", line 33, in reraise\r\nraise value\r\nFile \"/usr/local/lib/python3.6/site-packages/flask/app.py\", line 1612, in full_dispatch_request\r\nrv = self.dispatch_request()\r\nFile \"/usr/local/lib/python3.6/site-packages/flask/app.py\", line 1598, in dispatch_request\r\nreturn self.view_functions[rule.endpoint](**req.view_args)\r\nFile \"/usr/local/lib/python3.6/site-packages/flask_classy.py\", line 200, in proxy\r\nresponse = view(**request.view_args)\r\nFile \"/usr/local/lib/python3.6/site-packages/flask_apispec/annotations.py\", line 117, in wrapped\r\nreturn wrapper(*args, **kwargs)\r\nFile \"/usr/local/lib/python3.6/site-packages/flask_apispec/wrapper.py\", line 23, in __call__\r\nresponse = self.call_view(*args, **kwargs)\r\nFile \"/usr/local/lib/python3.6/site-packages/flask_apispec/wrapper.py\", line 39, in call_view\r\nreturn self.func(*args, **kwargs)\r\nFile \"/code/app/api/util/paginate.py\", line 27, in run\r\nresults = func(*args, **kwargs)\r\nFile \"/code/app/api/util/sort.py\", line 36, in run\r\nreturn results.all()\r\nFile \"/usr/local/lib/python3.6/site-packages/neomodel/match.py\", line 431, in all\r\nreturn self.query_cls(self).build_ast()._execute()\r\nFile \"/usr/local/lib/python3.6/site-packages/neomodel/match.py\", line 411, in _execute\r\nresults, _ = db.cypher_query(query, self._query_params)\r\nFile \"/usr/local/lib/python3.6/site-packages/neomodel/util.py\", line 26, in wrapper\r\nreturn func(self, *args, **kwargs)\r\nFile \"/usr/local/lib/python3.6/site-packages/neomodel/util.py\", line 98, in cypher_query\r\nresponse = session.run(query, params)\r\nFile \"/usr/local/lib/python3.6/site-packages/neo4j/v1/api.py\", line 340, in run\r\nself._connection.fetch()\r\nFile \"/usr/local/lib/python3.6/site-packages/neo4j/bolt/connection.py\", line 283, in fetch\r\nreturn self._fetch()\r\nFile \"/usr/local/lib/python3.6/site-packages/neo4j/bolt/connection.py\", line 300, in _fetch\r\nself._receive()\r\nFile \"/usr/local/lib/python3.6/site-packages/neo4j/bolt/connection.py\", line 338, in _receive\r\nraise self.Error(\"Failed to read from defunct connection {!r}\".format(self.server.address))\r\nneo4j.exceptions.ServiceUnavailable: Failed to read from defunct connection Address(host=xxxxxx, port=xxxx)```\r\n\r\nI don't have this problem developing locally with neo4j container but I run into this very frequently with GrapheneDB."}}
{"actor":{"display_login":"iwarin"}}