Number of open files

GNU/Linux and Mac OS operating systems impose an upper limit on the number of concurrent files a user may have open. This article covers how to configure the number of open files on GNU/Linux that use systemd or sysvinitd. For… Read more →

Explore:  


Why did I get the “Kernel API returned non-existent relationship type: -1” exception?

In rare situations, the Neo4j Bolt driver throws an IllegalStateException. The top part of the stack appears as: java.lang.IllegalStateException: Kernel API returned non-existent relationship type: -1 at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.getRelationshipTypeById(GraphDatabaseFacade.java:991) Under the covers, this is what happens. The getRelationshipTypeById(int type) method is… Read more →

Explore:  


Setup Neo4j Service to run with different service ID

By default when neo4j is installed as an RPM via yum or apt-get, it creates a user neo4j and group neo4j and runs as neo4j user. However it might be required to run Neo4j service as another service id other… Read more →

Explore:  


Configure Neo4j to authenticate users from different OUs using the Active Directory attribute samAccountName

Beginning with Neo4j version 3.2.2, it is possible to authenticate using the Active Directory attribute samAccountName as opposed to the LDAP Display Name attribute. This is described in detail in the following KB article: How do I allow for authentication… Read more →

Explore:  


Why do my deleted property keys appear?

When using the Neo4j Browser and selecting the left frame and top icon entitled Database Information or using the built in stored procedure db.propertyKeys() you may see property keys which are no longer associated with any nodes. This is expected.… Read more →

Explore:  


Executing Neo4j ETL from an RDBMS database running on Docker

Following provides some examples of importing a test csv data into Neo4j, using the Neo4j ETL tool’s command line interface with the source RDBMS database running on docker. Examples herein are specific to tests conducted on a MAC OSX host… Read more →

Explore:  


How to properly shutdown a Neo4j database after receiving the message took more than 120 seconds to stop

The neo4j script under the bin/ directory of any standard Neo4j install is the primary means of shutting down a running Neo4j instance. That script accepts a stop argument that will try to shutdown the running instance by sending a… 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:  


Causal Cluster FAQ for heavy workloads

Lagging of follower instances and what causes it? The main reason for followers to fall behind is highly concurrent and continuous read/write workloads. This can cause the instances get overwhelmed which causes some extra latency in propagating the data to… Read more →

Explore:  


Properly escaping input data for neo4j-import

Note neo4j-import is intended to populate a new, empty database. It cannot be used to import into an existing database. When importing data using neo4j-import, make sure to review the required CSV file structure and considerations before moving on. http://neo4j.com/docs/stable/import-tool.html… Read more →

Explore:  


Neo4j specific http request user agent strings

For those APOC commands that retrieve data using HTTP/HTTPS, and or running Cypher LOAD CSV the request will be sent with Neo4j specific user-agent/browser identifiers. Below is an example log from an Apache webservers access log at /var/log/apache2/access.log and includes… Read more →

Explore:  


Understanding transaction and lock timeouts

One way to handle runaway queries is to impose a time limit that will terminate a query when exceeded. There are some subtleties here that need to be understood to ensure proper behavior and avoid confusion. Defining a transaction timeout… Read more →

Explore:  


Control number of file handles created per Lucene Index

In the more recent Neo4j versions (3.4 onwards), the number of file handles opened by Neo4j may seem to increase compared with that in older versions. Native indexes require a per-index constant number of file handles, and this number scales… Read more →

Explore:  


Explanation of error “Security Error: 18” when using Internet Explorer and Neo4j Browser

When connecting to the Neo4j Browser http://localhost:7474 and using Internet Explorer 11, submission of cypher statements may result in error message Security Error: 18 As the Neo4j Browser is using websockets to connect , for example ws://localhost, you would need… Read more →

Explore:  


Understanding Database Growth

The easiest way to determine the size of your graph is through the filesystem and summing up the size of the files named *store.db*. For example on linux implementations one can run du -hc $NEO4J_HOME/data/databases/graph.db/*store.db* and this should be run… Read more →

Explore:  


Where is my neo4j.log in Ubuntu Linux?

In most Neo4j server environments, all logs will be found in NEO4J_HOME/logs. However, when Neo4j is running as a service on a Ubuntu (debian) Linux environment, usually installed via apt-get install neo4j or similar, the neo4j.log is not present. To… Read more →

Explore:  


java.lang.OutOfMemoryError: unable to create new native thread

When a client application establishes a session with a Neo4j server via the bolt or bolt+routing protocols, the server allocates a thread to serve as the server-side bolt worker to handle that connection. There is no server-side limitation on the… Read more →

Explore:  


Stopping the Neo4j docker image in order to restore from a backup

In a neo4j docker installation, the neo4j-admin restore requires the neo4j service to be stopped as one can’t do a restore on a running database. Subsequently, running as a docker image, stopping neo4j server could be done using a Ctrl-C… Read more →

Explore:  


Launching Neo4j Desktop in Linux (Ubuntu & Debian) with an .appimage file

Note: Neo4j installation on Linux using apt-get, as per the process here: https://neo4j.com/docs/operations-manual/current/installation/linux/debian/ distributes installation files across multiple system directories e.g. var/etc, var/log, /home/neo4j etc.. A quicker way to install is using the .appimage file directly from https://neo4j.com/download/ The download… Read more →

Explore:  


How deletes work in Neo4j

Neo4j uses logical deletes to delete from the database to achieve maximum performance and scalability. To understand how this might appear to an operator of the database, lets take a simple case of loading data into Neo4j. When you start… Read more →

Explore:  


Checkpointing and Log Pruning interactions

Overview Checkpointing is the process of flushing all pending page updates from the page cache to the store files. This is necessary for ensuring that the number of transactions that are in need of being replayed during recovery is kept… Read more →

Explore:  


Neo4j’s commit process explained

This article will try to guide you through Neo4j’s commit and replication processes both for single instances and causal clusters.   Single Instance When you call tx.commit(), the transaction will go through the Storage Engine which will transform that transaction… Read more →

Explore:  


Limiting MATCH results per row

Since LIMIT applies to the total number of rows of the query, it can’t be used in cases when matching from multiple nodes where the limit must be on match results per row. Take an example case using the Movies… Read more →

Explore:  


Startup failure due to misconfigured unmanaged extensions or plugins

Occasionally, following upgrades, one might encounter Neo4j server initialisation failure due to an exception similar to: 2019-11-14 12:57:40.446+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component ‘org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter@7f7eeaaf’ was successfully initialized, but failed to start. Please see the attached cause… Read more →

Explore:  


Are my cluster transactions/messages encrypted.

For all versions prior to 3.3, there is no encryption done specifically on the contents being transferred. Furthermore, since it doesn’t use REST or Bolt, there is no SSL/https configuration either. Transactions are propagated via transaction logs, which are a… Read more →

Explore: