py2neo在使用中经常出现ConnectionBroken问题
发布于 3 年前 作者 byronliu 630 次浏览 来自 问答

ERROR: Exception in ASGI application Traceback (most recent call last): File “/usr/local/lib/python3.6/site-packages/uvicorn/protocols/http/h11_impl.py”, line 369, in run_asgi result = await app(self.scope, self.receive, self.send) File “/usr/local/lib/python3.6/site-packages/uvicorn/middleware/proxy_headers.py”, line 59, in call return await self.app(scope, receive, send) File “/usr/local/lib/python3.6/site-packages/fastapi/applications.py”, line 201, in call await super().call(scope, receive, send) # pragma: no cover File “/usr/local/lib/python3.6/site-packages/starlette/applications.py”, line 112, in call await self.middleware_stack(scope, receive, send) File “/usr/local/lib/python3.6/site-packages/starlette/middleware/errors.py”, line 181, in call raise exc from None File “/usr/local/lib/python3.6/site-packages/starlette/middleware/errors.py”, line 159, in call await self.app(scope, receive, _send) File “/usr/local/lib/python3.6/site-packages/starlette/exceptions.py”, line 82, in call raise exc from None File “/usr/local/lib/python3.6/site-packages/starlette/exceptions.py”, line 71, in call await self.app(scope, receive, sender) File “/usr/local/lib/python3.6/site-packages/starlette/routing.py”, line 580, in call await route.handle(scope, receive, send) File “/usr/local/lib/python3.6/site-packages/starlette/routing.py”, line 241, in handle await self.app(scope, receive, send) File “/usr/local/lib/python3.6/site-packages/starlette/routing.py”, line 52, in app response = await func(request) File “/usr/local/lib/python3.6/site-packages/fastapi/routing.py”, line 217, in app dependant=dependant, values=values, is_coroutine=is_coroutine File “/usr/local/lib/python3.6/site-packages/fastapi/routing.py”, line 149, in run_endpoint_function return await dependant.call(**values) File “/data/httpd/industry_chains/industry_chains_API/industry_chain_graph_API.py”, line 22, in get_chains nodes = GraphENGINE.get_chain_only(request_data.chain_name, request_data.limit) File “/data/httpd/industry_chains/industry_chains_API/search_knowledge_graph.py”, line 31, in get_chain_only graph_nodes2 = self.graph.run(cql2) File “/usr/local/lib/python3.6/site-packages/py2neo/database.py”, line 405, in run return self.auto().run(cypher, parameters, **kwparameters) File “/usr/local/lib/python3.6/site-packages/py2neo/database.py”, line 980, in run readonly=self.readonly) File “/usr/local/lib/python3.6/site-packages/py2neo/client/init.py”, line 1343, in auto_run cx.pull(result, n=pull) File “/usr/local/lib/python3.6/site-packages/py2neo/client/bolt.py”, line 943, in pull self._sync(response) File “/usr/local/lib/python3.6/site-packages/py2neo/client/bolt.py”, line 747, in _sync self._wait(response) File “/usr/local/lib/python3.6/site-packages/py2neo/client/bolt.py”, line 742, in _wait self._fetch() File “/usr/local/lib/python3.6/site-packages/py2neo/client/bolt.py”, line 717, in _fetch tag, fields = self.read_message() File “/usr/local/lib/python3.6/site-packages/py2neo/client/bolt.py”, line 644, in read_message tag, fields = self._reader.read_message() File “/usr/local/lib/python3.6/site-packages/py2neo/client/bolt.py”, line 89, in read_message raise_from(ConnectionBroken(“Failed to read message”), error) File “<string>”, line 3, in raise_from py2neo.errors.ConnectionBroken: Failed to read message

偶发性错误,官方对这个错误的解释是Raised when a connection breaks during use 在使用中出现。这个问题对工作影响有点大,请问大家有什么好的办法解决? 谢谢~

回到顶部