Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import fails with error on "There is not enough memory to perform the current task." #12

Open
kuczera opened this issue Jun 19, 2019 · 4 comments

Comments

@kuczera
Copy link

kuczera commented Jun 19, 2019

My settings:

dbms.memory.heap.initial_size=8G
dbms.memory.heap.max_size=24G

Generating and linking claims (6) : 837.788ms
Started linking :Quantity to :Item
Linkied :Quantity to :Item : 15552434.502ms
Started linking :GlobeCoordinate to :Item
Structure {
signature: 127,
fields: [
{
code: 'Neo.TransientError.General.OutOfMemoryError',
message: 'There is not enough memory to perform the current task. Please ' +
"try increasing 'dbms.memory.heap.max_size' in the neo4j " +
"configuration (normally in 'conf/neo4j.conf' or, if you you " +
'are using Neo4j Desktop, found through the user interface) or ' +
'if you are running an embedded installation increase the heap ' +
"by using '-Xmx' command line flag, and then restart the " +
'database.'
}
]
}
exiting in 5 sec

@legraphista
Copy link
Contributor

This is strange.
Can you try to run this query manually?

MATCH (q:GlobeCoordinate)
     WHERE q.globe STARTS WITH 'http'
WITH
     q,
     TRIM(SPLIT(q.globe,'/')[-1]) AS itemId
MATCH (e:Entity) WHERE e.id = itemId
MERGE (q)-[:GLOBE_TYPE]->(e)
REMOVE q.globe

if this fails too, could you try to insert a LIMIT 1000 (or another value) between WITH and the second MATCH and run it until there are no more changes committed to the db.

@kuczera
Copy link
Author

kuczera commented Jun 22, 2019

Without limit the following error comes up:
There is not enough memory to perform the current task. Please try increasing 'dbms.memory.heap.max_size' in the neo4j configuration (normally in 'conf/neo4j.conf' or, if you you are using Neo4j Desktop, found through the user interface) or if you are running an embedded installation increase the heap by using '-Xmx' command line flag, and then restart the database.

@kuczera kuczera closed this as completed Jun 22, 2019
@kuczera
Copy link
Author

kuczera commented Jun 22, 2019

Running this Query for several times works:
MATCH (q:GlobeCoordinate)
WHERE q.globe STARTS WITH 'http'
WITH q, TRIM(SPLIT(q.globe,'/')[-1]) AS itemId LIMIT 10000000
MATCH (e:Entity) WHERE e.id = itemId
MERGE (q)-[:GLOBE_TYPE]->(e)
REMOVE q.globe;

I hope this helps to improve the code or do i have to do it manually every time ?

@kuczera kuczera reopened this Jun 22, 2019
@kuczera
Copy link
Author

kuczera commented Jun 22, 2019

sorry for closing ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants