Issue 1:
Guidelines

Please note that GitHub issues are only meant for bug reports/feature requests.

If you have questions on how to use Neo4j, please ask on StackOverflow instead of creating an issue here.

Before creating a new issue, please check whether someone else has raised the same issue. You may be able to add context to that issue instead of duplicating the report. However, each issue should also only be focussed on a single problem, so do not describe new problems within an existing thread - these are very hard to track and manage, and your problem may be ignored. Finally, do not append comments to closed issues; if the same problem re-occurs, open a new issue, and include a link to the old one.

To help us understand your issue, please specify important details, primarily:

Neo4j version: X.Y.Z

Operating system: (for example Windows 95/Ubuntu 16.04)

API/Driver: (for example Cypher/Java API/Python driver vX.Y.Z)

Steps to reproduce

Expected behavior

Actual behavior

Additionally, include (as appropriate) log-files, stacktraces, and other debug output.

Example bug report

I discovered that when I mount data/ to a volume on my host, and then stop the container, the write.lock is not removed as well as a number of other files not being cleaned up properly.

Neo4j Version: 3.0M03

Operating System: Ubuntu 15.10

API: Docker

Steps to reproduce

Pull the image: docker pull neo4j/neo4j:3.0.0-M03

Create a directory on the host that will be a mount for the data: mkdir /home/neo4j-data

Start a new container that mounts to this directory: docker run -d --name neo4j-test -p 7474:7474 -v /home/neo4j-data:/data neo4j/neo4j:3.0.0-M03

Navigate to the write.lock file located in the directory: /data/databases/graph.db/schema/label/lucene/labelStore/1/

Stop the container: docker stop neo4j-test

Expected behavior

write.lock should be removed now.

Actual behavior

write.lock is still present and preventing access by other programs.

Issue 2:
bug report

The neo4j-import tool for version 3.0.4 runs of memory, and is not reading the java max heap settings set at the OS level (i.e., it is identifying a max heap of 20.98 gb when the max heap is set at 72gb)

Neo4j Version: 3.0.4

Operating System: Ubuntu 14.10

API: neo4j-import

Steps to reproduce

I am trying to import a set of relatively large csv files related to the Microsoft Academic Graph. When I run the neo4j-import tool, the tool arbitrarily selects a maximum Java Heap size of 20gb, even though I have the max heap size set on my machine to ~72gb. After the import tool runs for some time I get a java.lang.OutOfMemoryError: Java heap space.

Expected behavior

The import tool should handle large data sets without running out of memory.

Actual behavior

The import tool aborts when the heap space is used. I've pasted the output of the import below.

Neo4j version: 3.0.4

Importing the contents of these files into graph.db:

Nodes:

:Conference

/usr/share/neo4j/import/conference_header.csv

/usr/share/neo4j/import/Conferences.txt

:Author

/usr/share/neo4j/import/author_header.csv

/usr/share/neo4j/import/Authors.txt

:FoS

/usr/share/neo4j/import/fos_header.csv

/usr/share/neo4j/import/fieldsofstudy.csv

:Journal

/usr/share/neo4j/import/journal_header.csv

/usr/share/neo4j/import/Journals.txt

:Paper

/usr/share/neo4j/import/paper_header.csv

/usr/share/neo4j/import/Papers.txt

:Affiliation

/usr/share/neo4j/import/affiliation_header.csv

/usr/share/neo4j/import/Affiliations.txt

:AuthorAffiliation

/usr/share/neo4j/import/authoraffiliations.csv

Relationships:

:parent_of

/usr/share/neo4j/import/fos_hierarchy_header.csv

/usr/share/neo4j/import/foshierarchy.csv

:about

/usr/share/neo4j/import/paper_keyword_header.csv

/usr/share/neo4j/import/PaperKeywords.txt

:cited

/usr/share/neo4j/import/paper_references_header.csv

/usr/share/neo4j/import/PaperReferences.txt

:wrote

/usr/share/neo4j/import/wrote_header.csv

/usr/share/neo4j/import/PaperAuthorAffiliations.txt

:wrote_while_at

/usr/share/neo4j/import/authaffilpaper.csv

:affiliated_with

/usr/share/neo4j/import/affiliatedwith.csv

:published_in

/usr/share/neo4j/import/paperjournal.csv

/usr/share/neo4j/import/paperconference.csv

Available memory:

Free machine memory: 65.03 GB

Max heap memory : 20.98 GB

....

*DEDUPLICATE:10.91 GB------------------------------------------------------------------------] 193M

Exception in thread "Thread-581" java.lang.OutOfMemoryError: Java heap space

at java.util.Arrays.copyOf(Arrays.java:3308)

at org.neo4j.unsafe.impl.batchimport.input.BadCollector.collectDuplicateNode(BadCollector.java:113)

at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.detectDuplicateInputIds(EncodingIdMapper.java:589)

at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.buildCollisionInfo(EncodingIdMapper.java:493)

at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.prepare(EncodingIdMapper.java:281)

at org.neo4j.unsafe.impl.batchimport.IdMapperPreparationStep.process(IdMapperPreparationStep.java:54)

at org.neo4j.unsafe.impl.batchimport.staging.LonelyProcessingStep$1.run(LonelyProcessingStep.java:56)

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

at java.util.Arrays.copyOf(Arrays.java:3308)

at org.neo4j.unsafe.impl.batchimport.input.BadCollector.collectDuplicateNode(BadCollector.java:113)

at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.detectDuplicateInputIds(EncodingIdMapper.java:589)

at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.buildCollisionInfo(EncodingIdMapper.java:493)

at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.prepare(EncodingIdMapper.java:281)

at org.neo4j.unsafe.impl.batchimport.IdMapperPreparationStep.process(IdMapperPreparationStep.java:54)

at org.neo4j.unsafe.impl.batchimport.staging.LonelyProcessingStep$1.run(LonelyProcessingStep.java:56)