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 to monitor if a follower is in sync with Leader (Causal Cluster)

To monitor if a Follower is in sync with its Leader, or know how much it is lagging behind, it is possible to check the Last Commited Transaction Id from Leader and Follower. Last Commited Transaction Id can be assessed… Read more →

Explore:  


Using Cypher to generate Cypher statements to recreate Users and Roles

The following can be used to extract user and role definitions from an existing database and the resultant output can be played back on another Neo4j database. //export roles return ‘//export Roles’ as output union all call dbms.security.listRoles() yield role… Read more →

Explore:  


Creating and working with linked lists in Cypher

At some point when working with a graph, you may want to create a linked list out of some nodes. If each of the nodes to be linked has its own variable, this is easy, you just do a CREATE… Read more →

Explore:  


Helpful Commands When Supporting Neo4j

Top 50 Slowest queries from Query log: $ grep -i “INFO” query.log | sort -r -n -k 4 | head -50 > long_queries.log Find Longest GC Pauses in debug or messages log: $ grep -n -i blocked debug.log | sort… 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:  


Diagnosing network latency in a Causal Cluster using MTR

MTR is a simple ICMP based test combining ping and traceroute. The following demonstrates usage of the MTR trace tool to diagnose network latency and packet loss in a Causal Cluster. The tool is commonly used on Windows via the… 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:  


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:  


Understanding causal cluster quorum and cluster recovery

Several major causal cluster operations require a majority of cluster members to be online, a majority quorum. When a causal cluster loses majority quorum, it loses write capability as well as the ability to add or remove members of 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:  


How to avoid using excessive memory on deletes involving dense nodes

In situations where you know you need to delete a bunch of nodes (and by rule their relationships as well), it can be tempting to simply use DETACH DELETE and be done with it. However, this can become problematic if… Read more →

Explore:  


How to fix “Cannot close the PageCache while files are still mapped”

Incorrect file permissions on store files It is common to start the database as different users, this can leave store files owned by other user ids. ( e.g. root ) In such case, you might want to fix the store… 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:  


How to avoid costly traversals with join hints

When matching a pattern using Cypher, the number of possible paths to evaluate often correlates with query execution time. When there is a supernode in the path (a node with a high number of relationships whose type are included in… 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:  


Proper File Permissions on Neo4j Server

When installing Neo4j Server, keep in mind that the bin/neo4j executable will need to be run by some OS system user, and that user will need write permissions to some files/directories, specifically to the data directory. That user will also… 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 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:  


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:  


When to use bookmarks

Bookmarks are part of a broader topic: Causal consistency. We recommend reading the introduction to Neo4j Causal Clustering and the lifecycle of a Neo4j Causal Cluster before reading further. Pay special attention to Causal Consistency explained. Bookmarks ensure than when… Read more →

Explore: