cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

Intermittent error on deployed service using neo4j + fastapi

borismnq
Node

Hi guys, I'm getting this error (not always) but when could suddenly appear after 2/3 days after the app is deployed, and its solved after the app's container is rebooted.
I've tried to look out for the solution on web but unsuccessfully, hope you can help me.
- python version: 3.8
- fastAPI version: 0.61.2
- neo4j lib version: 4.4.8
- error: 

 

Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 376, in run_asgi result = await app(self.scope, self.receive, self.send) File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__ return await self.app(scope, receive, send) File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 179, in __call__ await super().__call__(scope, receive, send) File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 111, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__ raise exc from None File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__ await self.app(scope, receive, _send) File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__ raise exc from None File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__ await self.app(scope, receive, sender) File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 566, in __call__ await route.handle(scope, receive, send) File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 41, in app response = await func(request) File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 172, in app solved_result = await solve_dependencies( File "/usr/local/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 518, in solve_dependencies solved_result = await solve_dependencies( File "/usr/local/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 518, in solve_dependencies solved_result = await solve_dependencies( File "/usr/local/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 552, in solve_dependencies solved = await run_in_threadpool(call, **sub_values) File "/usr/local/lib/python3.8/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool return await loop.run_in_executor(None, func, *args) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/app/di/providers.py", line 144, in neo4j_driver_module return GraphDatabase.driver(uri_db, auth=(user_db, password_db)) File "/usr/local/lib/python3.8/site-packages/neo4j/__init__.py", line 186, in driver return cls.neo4j_driver(parsed.netloc, auth=auth, routing_context=routing_context, **config) File "/usr/local/lib/python3.8/site-packages/neo4j/__init__.py", line 209, in neo4j_driver return Neo4jDriver.open(*targets, auth=auth, routing_context=routing_context, **config) File "/usr/local/lib/python3.8/site-packages/neo4j/__init__.py", line 410, in open pool = Neo4jPool.open(*addresses, auth=auth, routing_context=routing_context, pool_config=pool_config, workspace_config=default_workspace_config) File "/usr/local/lib/python3.8/site-packages/neo4j/io/__init__.py", line 577, in open pool.update_routing_table(database=workspace_config.database) File "/usr/local/lib/python3.8/site-packages/neo4j/io/__init__.py", line 787, in update_routing_table if self.update_routing_table_from(self.first_initial_routing_address, database=database): File "/usr/local/lib/python3.8/site-packages/neo4j/io/__init__.py", line 765, in update_routing_table_from new_routing_table = self.fetch_routing_table(address=router, timeout=self.pool_config.connection_timeout, database=database) File "/usr/local/lib/python3.8/site-packages/neo4j/io/__init__.py", line 728, in fetch_routing_table new_routing_info = self.fetch_routing_info(address=address, timeout=timeout, database=database) File "/usr/local/lib/python3.8/site-packages/neo4j/io/__init__.py", line 695, in fetch_routing_info with self._acquire(address, timeout) as cx: File "/usr/local/lib/python3.8/site-packages/neo4j/io/__init__.py", line 409, in _acquire connection = self.opener(address, timeout) File "/usr/local/lib/python3.8/site-packages/neo4j/io/__init__.py", line 572, in opener return Bolt.open(addr, auth=auth, timeout=timeout, routing_context=routing_context, **pool_config) File "/usr/local/lib/python3.8/site-packages/neo4j/io/__init__.py", line 193, in open s, pool_config.protocol_version, handshake, data = connect( File "/usr/local/lib/python3.8/site-packages/neo4j/io/__init__.py", line 1049, in connect raise last_error File "/usr/local/lib/python3.8/site-packages/neo4j/io/__init__.py", line 1041, in connect return _handshake(s, address) File "/usr/local/lib/python3.8/site-packages/neo4j/io/__init__.py", line 997, in _handshake ready_to_read, _, _ = select((s,), (), (), 1) ValueError: filedescriptor out of range in select()

 

 Thanks in advance.
Boris Nieto

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online