Loading bulk data into neo4j with Neography results in connection error

128 Views Asked by At

I'm trying to read a lot of bulk data (probably around 1-2G) into neo4j with a simple ruby script and Neography. My code mostly just consists of a lot of create_node and create_relationship methods.

It seems to work fine, but after around 5,000 create methods I reach an error:

/home/earlz/.gem/ruby/2.1.0/gems/excon-0.44.3/lib/excon/socket.rb:127:in `connect_nonblock': Cannot assign requested address - connect(2) for 127.0.0.1:7474 (Errno::EADDRNOTAVAIL) (Excon::Errors::SocketError)

How do I fix this? I've tried increasing the HTTP timeouts and such, but this didn't help anything

1

There are 1 best solutions below

0
Jesus Castello On

It seems like your script is opening so many connections that it ran out of ephemeral ports to pick from. Try this:

echo "32768 61000" >/proc/sys/net/ipv4/ip_local_port_range