Know Your Stack – Neo4j
Sometimes things go south in production. Often its a combination of events that have generated a perfect storm. The storm being production outages that are difficult to diagnose due to lack of understanding of the application stack, tools, and knowledge.
When attempting to diagnose an issue, its important to piece together the situation though evidence – log files, monitoring tools, etc. Your own codebase can often be improved with appropriate logging and inclusion of monitoring tools/UI’s. Issues often come about with off-the-shelf products, and lack of knowledge around how to understand the inner workings. One example in Neo4j. What follows is a few hopefully helpful suggestion to understand what is going on in your application stack:
- Neo4j has a query.log which is extremely useful in tailing to view the queries being run, and the time to execute each query.
- Neo4j browser (port 7474 by default) has a “:play sysinfo” which has some basic information that can prove useful e.g the Transaction tile, and in particular “Current”. If Current remains move than 0 for a duration, when you expect it to be 0, you could have long running transactions 😦
- Neo4j 3.1+ has improved query management. In particular its now possible to see what queries are running, and kill queries if required
- Reading documentation before using a product is key. Remember the Open Files for Neo4j.