Can I use NFS as my filesystem or datastore storage?

The short answer is no. Although this may seem harmless, the reason for this is not performance related, but rather for control over locking files. NFS and other filesystems that don’t offer locking should not be used to install Neo4j… Read more →

Explore:  


Explanation of error “Unrecognized transaction id. Transaction may have timed out and been rolled back”

When submitting a request via the Neo4j Transactional Cypher HTTP endpoint, one may encounter the following error Unrecognized transaction id. Transaction may have timed out and been rolled back This error may occur as a result of the transactions expiration… Read more →

Explore:  


How do I define a LOAD CSV FIELDTERMINATOR in hexidecimal notation

When using LOAD CSV one can define the field delimiter used, whereby the default is the ‘,’ character. If you want to override the default this can be accomplished via the paramter FIELDTERMINATOR, for example LOAD CSV WITH HEADERS from… Read more →

Explore:  


Explanation of error LOAD CSV error of “Couldn’t load the external resource …​”

When running a LOAD CSV Cypher statement, for example LOAD CSV WITH HEADERS FROM “http://10.12.1.2/Neo4j/cities.csv” AS row WITH row create (c:cities {name:row.city}); whether through bin/neo4j-shell or the browser at http://localhost:7474 this may result in an error as follows couldn’t load… Read more →

Explore:  


Linux Out of Memory killer

The Out Of Memory Killer or OOM Killer is a process that the linux kernel employs when the system is critically low on memory. This situation occurs because the linux kernel has over allocated memory to its processes. When a… Read more →

Explore:  


Lock Manager Differences Explained

Work in Progress Community: uses Java intrinsic locks, i.e. ’synchronized’. this might not perform that well on multiprocessor machines uses Thread.sleep() and Thread.interrupt() to wait for locks. this involves context switches which can be expensive keeps global graph or all… Read more →

Explore:  


A note on OPTIONAL MATCHes

An OPTIONAL MATCH matches patterns against your graph database, just like a MATCH does. The difference is that if no matches are found, OPTIONAL MATCH will use a null for missing parts of the pattern. OPTIONAL MATCH could be considered… Read more →

Explore:  


Achieving longestPath Using Cypher

While Cypher is optimized for finding the shortest path between two nodes, with such functionality as shortestPath(), it does not have the same sort of function for longest path. In some cases, you may want this, and not the shortest… Read more →

Explore:  


How do I log parameter values into the query.log file

Neo4j 3.0 introduces the ability to log the value of query parameters in the log/query.log file. The settings to control this feature are located in the conf/neo4j.conf file. To enable query logging with parameters, one must first enable query logging… Read more →

Explore:  


Configuring Remote JMX monitoring

In order to enable JMX Remote monitoring, edit the neo4j-wrapper.conf file in Neo4j 3.0.x versions or neo4j.conf file in Neo4j 3.1.x versions and uncomment the following lines: dbms.jvm.additional=-Dcom.sun.management.jmxremote.port=3637 dbms.jvm.additional=-Dcom.sun.management.jmxremote.authenticate=true dbms.jvm.additional=-Dcom.sun.management.jmxremote.password.file=conf/jmx.password dbms.jvm.additional=-Dcom.sun.management.jmxremote.access.file=conf/jmx.access After uncommenting the above lines, restart neo4j. If the… Read more →

Explore:  


Using supervisord to manage Neo4j process

In general, running the neo4j process directly is the most common way to start and stop the neo4j server. However, if you use supervisord to manage processes, this has worked for others. Things to keep in mind: supervisord can only… Read more →

Explore:  


Debian / Ubuntu: How to enforce a certain version of neo4j when using debian packages

If you want to run a specific version of Neo4j and install the software via a debian repository you need to use a technique called apt pinning. Otherwise any system update will also update Neo4j to its latest stable version.… Read more →

Explore:  


Will execution_guard_enabled work in my release of Neo4j?

Background From the beginning, the execution guard was never meant to be used by the general public. However, the feature was there in the product, though undocumented, and it did work for the purpose of preventing long running queries from… Read more →

Explore:  


Using Cypher to generate Cypher statements to recreate indexes and constraints

The following can be used to extract index definitions and constraint definitions from an existing database and the resultant output can be played back on another Neo4j database. For example with the :play movies dataset as when run from the… Read more →

Explore:  


How do I compare two graphs for equality

If you are looking to compare 2 graphs (or sub-graphs) to determine if they are equivalent, the following Cypher will produce a md5sum of the nodes and properties to make that comparison. For example, you may wish to compare a… Read more →

Explore:  


How do I configure init and max java heap when running bin/neo4j-backup

When running $NEO4J_HOME/bin/neo4j-backup if a Java out of heap/memory error occurs you may want define the init and max Java heap to be used by neo4j-backup. The default behavior is to allow the JVM to define the init and max… Read more →

Explore:  


How do I use Cypher to connect to a RDBMS using JDBC

With the inclusion of java stored procedures in Neo4j 3.x, one can run Cypher to connect to a RDBMS using JDBC. To do so one needs to download and install https://github.com/neo4j-contrib/neo4j-apoc-procedures. After installation of the Neo4j APOC kit, download the… Read more →

Explore:  


How to write a Cypher query to return the top N results per category

The following Cypher describes how you can display the Top 5 test scores within an entire :Score population broken out by a field_of_study property. create (n:Score {student_id: ‘DC001’, score: 89, field_of_study: ‘chemistry’}); create (n:Score {student_id: ‘MK812’, score: 97, field_of_study: ‘chemistry’});… Read more →

Explore:  


Troubleshooting Connection Issues in Neo4j Browser and Cypher Shell

This page describes common issues users may encounter in connecting Neo4j Browser or cypher-shell to a Neo4j database, and how to address them. Connection Timeout Symptom: connection attempts lag for a long time, and then fail with connection timed out… Read more →

Explore:  


A light weight approach to validating network port connectivity

If it becomes necessary to validate, particularly in a clustered environment whether Causal Cluster or High Availability, whether or not 1 instance can talk to another instance on a given port one can use linux command netcat. To validate connectivity… Read more →

Explore:  


Access to the neo4j-shell in NEO4J CE 3.x

From Neo4j 3.0 access to neo4j-shell is no longer possible from the desktop-installers for Windows and OSX. To use neo4j-shell, you have to download the TAR/ZIP distribution from: http://neo4j.com/download/other-releases/ For importing files that contain semicolon separated cypher commands, you can… Read more →

Explore:  


Updating a node but returning its state from before the update

Some use cases require updating node (or relationship) properties, but returning the node (or relationship) as it was prior to the update. You’ll need to get a ‘snapshot’ of the node before the update, and return that snapshot instead of… Read more →

Explore:  


Comparing relationship properties within a path

You want to compare relationship-properties of a path, either by a global value or parameter, or with each other within a path. Basic model: (:Person {person_id:’123′})-[:FRIEND {date:’1972-01-01′}]->(m:Person {person_id:’456′}) Make sure to have an constraint OR index on your nodes: Constraint… Read more →

Explore:  


How do I convert Neo4j logs from base UTC to local timezone

With the introduction of Neo4j 3.3.1 it is possible to represent date timestamps in your $NEO4J_HOME/logs/* in either UTC or SYSTEM timezone through the implementation of dbms.logs.timezone However for prior releases all Neo4j logs will preface each line with a… Read more →

Explore:  


Explanation of error “Database constraints have changed (txId=xxxxx) after this transaction (txId=yyyyy) started, which is not yet supported”

The following error, via bin/neo4j-shell: Database constraints have changed (txId=84) after this transaction (txId=81) started, which is not yet supported. Please retry your transaction to ensure all constraints are executed. or as logged in log/debug.log (3.x) or graph.db/messages.log (2.3.x): 2016-10-18… Read more →

Explore: