Question

I am using py2neo for accessing neo4j database. I'm loading the graph from data in text file.

Since my data-set has about a million nodes, it takes quite a long time for loading the entire data-set. Somewhere in between, the code throws py2neo.rest.NoResponse. I have tried running the code several times. It fails at different points. I don't see any patters in the errors. I mean I don't see any errors due to data in the file or it's not at the same point in file it fails. I know this from my log files.

Error stack trace is as below:

Traceback (most recent call last):
  File "C:\Users\darshan.hegde\workspace\movie_lens_loader\src\load_movie_lens_data.py", line 100, in <module>
    main()
  File "C:\Users\darshan.hegde\workspace\movie_lens_loader\src\load_movie_lens_data.py", line 97, in main
    LMLD.load_ratings_data(ratings_file_path)
  File "C:\Users\darshan.hegde\workspace\movie_lens_loader\src\load_movie_lens_data.py", line 71, in load_ratings_data
    user_node.create_relationship_to(movie_node, "rated", {"stars": ratings.stars})
  File "C:\Python26\lib\site-packages\py2neo\neo4j.py", line 581, in create_relationship_to
    'data': properties
  File "C:\Python26\lib\site-packages\py2neo\rest.py", line 252, in _post
    return self._request('POST', uri, json.dumps(data), **kwargs)
  File "C:\Python26\lib\site-packages\py2neo\rest.py", line 240, in _request
    raise NoResponse(uri)
py2neo.rest.NoResponse: u'http://localhost:7474/db/data/node/16088/relationships'

Has anybody came across same error ? Please let me know the solution.

I'm not sure if this information helps. I'm using the following versions: Python-2.6.6 and py2neo-1.2.15

Was it helpful?

Solution

Sorry that you're having issues with py2neo. It's not easy to see in this instance what might be causing the error since you say that it reoccurs at random intervals while under heavy load.

My guess is that you are seeing some form of resource saturation, with a limit being reached which prevents any further HTTP connections from being made. I have been seeing a number of Tornado-related issues recently and it's quite possible that you are seeing another example. It seems that Windows and Tornado fit together particularly badly.

I am currently working on an alternative HTTP engine for py2neo which may help in your case. Stay tuned and hopefully your experience may improve!

Cheers, Nige

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top