cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Error with memory neo4j browser

Hello, I have a memory problem in neo4j browser, the characteristics of the development environment are as follows.

Ubuntu 18.04 Neo4j Community 3.5.8.
dbms.memory.heap.initial_size 7.800 m
dbms.memory.heap.max_size 7.800 m
dbms.memory.pagecache.size 9.800 m
Workload is 10 GB

Memory configuration was made as recommended by neo4j-admin memrec. Here is a picture of the error.

3 REPLIES 3

anthapu
Graph Fellow

Can you provide how much total memory the system has and if anything else is running on that machine.

Also, what is the query you are running and how big the data base is?

the system has 24 gb of ram and 1 tb of hard drive, all this in virtualbox in windows, this is the code and the workload is 14 gb

PROFILE
MATCH (:TagClass {name: 'Single'})<-[:HAS_TYPE]-(:Tag)<-[:HAS_TAG]-(message:Message)
WITH DISTINCT message
MATCH (message)-[:IS_LOCATED_IN]->(:Country)-[:IS_PART_OF]->(continent:Continent)
create (message)-[:BI_24_message_continent]->(continent)

Since Neo4j is an ACID database, commits to it must be atomic, so all changes must be handled in the same transaction.

In this case it looks like you're trying to do a graph-wide change, so most likely you're looking at hundreds of thousands to millions or more changes at once, and you don't have enough heap to keep all of that in heap memory at once.

You should look at leveraging periodic procedures from the APOC Procedures library to perform this as batch updates. Something like this:

CALL apoc.periodic.iterate("
  MATCH (:TagClass {name: 'Single'})<-[:HAS_TYPE]-(:Tag)<-[:HAS_TAG]-(message:Message)
  MATCH (message)-[:IS_LOCATED_IN]->(:Country)-[:IS_PART_OF]->(continent:Continent)
  RETURN message, continent",
  "MERGE (message)-[:BI_24_message_continent]->(continent)", {}) YIELD batches, total, errorMessages
RETURN batches, total, errorMessages