Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-30-2022 08:16 AM
Hello,
I'm inserting some data into the DB using parallel request, using Python and joblib. The querys are pretty simple, I have an ID for a parent node, and a list of IDs for the child nodes. The query matches the parent node and using UNWIND goes through the child node list and insert them with a relation to the parent node. Nothing too fancy.
Now, at some point at random I get this little error:
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/io/_common.py", line 55, in _yield_messages
buffer.receive(sock, 2)
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/packstream.py", line 605, in receive
n = sock.recv_into(view[self.used:end], end - self.used)
OSError: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
File "/home/ubuntu/Projects/labs-re-dni/src/drivers/neo.py", line 281, in _write_arbitrary_query
return tx.run(query)
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/work/transaction.py", line 137, in run
result._tx_ready_run(query, parameters, **kwparameters)
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/work/result.py", line 70, in _tx_ready_run
self._run(query, parameters, None, None, None, None, **kwparameters)
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/work/result.py", line 114, in _run
self._attach()
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/work/result.py", line 203, in _attach
self._connection.fetch_message()
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/io/_common.py", line 170, in inner
func(*args, **kwargs)
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/io/_bolt4.py", line 286, in fetch_message
details, summary_signature, summary_metadata = next(self.inbox)
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/io/_common.py", line 81, in __next__
tag, fields = self.pop()
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/io/_common.py", line 75, in pop
return next(self._messages)
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/io/_common.py", line 72, in _yield_messages
self.on_error(error)
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/io/__init__.py", line 544, in _set_defunct_read
self._set_defunct(message, error=error, silent=silent)
File "/home/ubuntu/anaconda3/envs/DNI/lib/python3.10/site-packages/neo4j/io/__init__.py", line 556, in _set_defunct
log.debug("[#%04X] %s", self.socket.getsockname()[1], error)
OSError: [Errno 9] Bad file descriptor
And I have no idea what it means. I do know that if a I use the Neo4j Desktop this error doesn't happen so maybe the issue is with the Docker image. I start the container like this:
docker run --name neo4j -d -p7474:7474 -p7687:7687 --restart unless-stopped -v=/home/ubuntu/neo4j/data:/data -v /home/ubuntu/data:/var/lib/neo4j/import -v /home/ubuntu/neo4j/logs:/var/lib/neo4j/logs \
-e NEO4J_AUTH=neo4j/test -e NEO4J_dbms_logs_http_enabled=true -e NEO4J_dbms_security_procedures_unrestricted=apoc.text.* \
-e NEO4JLABS_PLUGINS='["graph-data-science","apoc"]' -e NEO4J_server_memory_heap_initial__size=3400m -e NEO4J_server_memory_heap_max__size=3400m \
-e NEO4J_server_memory_pagecache_size=1700m neo4j:latest
I'm using the Community edition.
Any help is appreciated.
Thanks
All the sessions of the conference are now available online