Neo4j, There is not enough space on the disk - neo4j

In our application which is using neo4j-1.8.2 we have so called synchronization process. This process reads some data from SQL Server db, processes it in some way and makes appropriate changes to the graph database. In the case if we have disk space outage (those disk where we have neo4j database located), neo4j server stops working (it is still running stops answering the queries). In neo4j web admin I have the following response for each cypher query- "Failed to get current transaction.". In the log file I see:
SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
org.neo4j.graphdb.TransactionFailureException: Unable to commit transaction
...
Caused by: java.io.IOException: There is not enough space on the disk
My question is: when I clean some content from disk and around 10GB of free space appeared, does it mean that neo4j server will start working (answering to queries) again automatically OR do I need to restart it?
I see that it is not working after cleaning some content, I have to restart it, then it starts working again? I want to know if this is expected or can I do something to avoid restarting neo4j server?
Thanks in advance,
Denys

You have to restart Neo4j when running out of disc. Best practice is to setup some monitoring system giving you alert if free disc space goes below a certain capacity.

Related

In Perforce (P4V), I am trying to delete a workspace but getting an error that says the File System P4ROOT doesnt have enough space

the exact error message says The filesystem 'P4ROOT' has only 1.9G free, but the server configuration requires at least 2G available.
I am trying to delete a new workspace i made by accident but keep getting this error, P4V now wont let me do anything, including deleting this workspace that seems to be causing the issue. How do i fix this?
P4ROOT is on the server, so if you're connecting to a remote server, you need to contact the admin of that server and let them know that it's wedged. Your workspace specifically is not the problem, the overall lack of space on the server is. All that needs to happen to fix it is increasing the available disk space. (Deleting your workspace would free up a little space on the remote server by pruning the associated db entries, but those are very small compared to the depot files.)
The "requires 2G available" thing is because by default the server looks for an available 2GB of empty space before it starts any operation; that's to provide reasonable assurance that it won't run out of space completely during the operation, since actually hitting a hard limit can be hard to recover from (db tables might be in a partially-written state, etc).
If the admin wants to try fixing this by obliterating large files (this is usually a pain and I'd recommend just throwing a bigger hard drive at the problem instead), they can temporarily lower that threshold to be able to run the obliterate, but I'd recommend bumping it back afterwards.

NEO4J BoltConnectionError: No connection found, did you connect to Neo4j?

I am new to Neo4j , using Desktop (3.4.1 Enterprise Version).
I have used LOAD CSV utility executed from Cypher Shell Command close to 1 Million records in the file. I have monitored the load using Neo4j browser by monitoring the count of properties and relationships that was created. Every time the load stops with the error "BoltConnectionError: No connection found, did you connect to Neo4j?" . I have also tried monitoring through the browser localhost:7474 - the error is different "server connection time out.. " , but the end result is that the load CSV fails to completed. Could someone please advise or guide me what needs to be done to resolve this issue ?
You should be loading along with USING PERIODIC COMMIT when loading data to batch the load and avoid killing your heap.
Also, you may want to EXPLAIN your query and ensure your load is using index lookups, especially if you're doing MERGEs on node properties.
In your query plan, watch out for Eager operations, that will effectively kill your periodic commit approach (and the browser should warn you with that query if it's in the query box prior to executing). You should include your query here for analysis and troubleshooting (along with the query plan) if the previous advice isn't enough to help you pinpoint the issue.

How to know when Neo4j is ready to serve

I've developed an application which connects to Neo4j and creates a bunch of nodes. I've also developed a plugin for Neo4j using Graphaware. And both these are run in separate dockers (one for the code and one for the Neo4j with plugin).
Now, since I start these containers automatically and simultaneously, the code should wait for the Neo4j to completely start before it tries creating the nodes. For that, I'm testing the availability of the Neo4j by trying to connect to it using bolt protocol (Neo4j's driver).
The problem I've got is that it seems Neo4j starts accepting incoming connections before it completely loads the plugins. As the result, the connection is made before Neo4j is actually prepared and also something goes wrong (I don't know what) and the whole code halts (I don't think this issue is important) all because the connection is made before the plugins are loaded. I know that since if I delay the connection manually, everything goes forward smoothly.
So my question is how to make sure that Neo4j is warmed up (fully) before starting to connect to it? Right now I'm checking the availability of management (http://localhost:7474) but what if there's no management, to begin with?
At the moment you'll find that you can keep the management interface local, but you can't actually turn it off (unless you're working in embedded mode), so waiting for http://localhost:7474 is a good approach. If you want to be more fine-grained, you can check yourinstallation\logs\debug.log
2017-07-27 03:58:53.643+0000 INFO [o.n.k.AvailabilityGuard] Fulfilling of requirement makes database available: Database available
2017-07-27 03:58:53.644+0000 INFO [o.n.k.i.f.GraphDatabaseFacadeFactory] Database is now ready
Hope this helps.
Regards,
Tom

Neo4j 2.0.4 browser cannot query large datasets

Whenever I try to run cypher queries in Neo4j browser 2.0 on large (anywhere from 3 to 10GB) batch-imported datasets, I receive an "Unknown Error." Then Neo4j server stops responding, and I need to exit out using Task Manager. Prior to this operation, the server shuts down quickly and easily. I have no such issues with smaller batch-imported datasets.
I work on a Win 7 64bit computer, using the Neo4j browser. I have adjusted the .properties file to allow for much larger memory allocations. I have configured my JVM heap to 12g, which should be fine for 64bit JDK. I just recently doubled my RAM, which I thought would fix the issue.
My CPU usage is pegged. I have the logs enabled but I don't know where to find them.
I really like the visualization capabilities of the 2.0.4 browser, does anyone know what might be going wrong?
Your query is taking a long time, and the web browser interface reports "Unknown Error" after a certain timeout period. The query is still running, but you won't see the results in the browser. This drove me nuts too when it first happened to me. If you run the query in the neo4j shell you can verify whether or not this is the problem, because the shell won't time out.
Once this timeout occurs, you can find that the whole system becomes quite non-responsive, especially if you re-run the query, because now you have two extremely long queries running in parallel!
Depending on the type of query, you may be able to improve performance. Sometimes it's as simple as limiting the number of returned nodes (in cases where you only need to find one node or path).
Hope this helps.
Grace and peace,
Jim

Neo4j slow loading

I'm crawling(using sampling API) twitter and saving the
crawled data into a Neo4j database.
When the total number of nodes exceed 20,000, my neo4j takes for ever to start.
It will just stoping at "...waiting for server to be ready ..." and nothing happens.
I normally wait for about 5~10 mins before I terminate the start, and so far I was unable to start process the server with that amount of node.
However, when I remove the "data" directory everything will start just fine.
I have inspected the neo4j.log file and found the following as well:
May 26, 2013 9:21:53 PM org.neo4j.server.logging.Logger log
INFO: Setting startup timeout to: 120000ms based on -1
I was wondering does Neo4j loads everything into memory during the service startup ?
What should I do to speed up the startup time of the service ?
One way is to check with initial memory recommendation using: https://neo4j.com/docs/operations-manual/current/tools/neo4j-admin-memrec/
And then change heap (it uses heap to store state of the graph along with query etc).

Resources