Skip to content

Cypher query eating a lot of RAM then ('java.lang.OutOfMemoryError', 'Java heap space') #3218

@ExtReMLapin

Description

@ExtReMLapin

Hello,

Query executed :

MATCH (searchedChunk:CHUNK) WHERE ID(searchedChunk) IN $_ids
            MATCH (sourceDoc:DOCUMENT)<-[chunkDocRel:in]-(searchedChunk:CHUNK)
            OPTIONAL MATCH (searchedChunk:CHUNK)<-[chunkNerOneRel:in]-(nerOne:NER)
            OPTIONAL MATCH (nerOne:NER)-[nerOneNerTwoRel]->(nerTwo:NER)-[chunkNerTwoRel:in]->(searchedChunk:CHUNK)
            OPTIONAL MATCH (searchedChunk:CHUNK)<-[themeToChunkRel:topic]-(theme:THEME)
            RETURN 
                collect(DISTINCT searchedChunk) AS searchedChunks,
                collect(DISTINCT sourceDoc) AS sourceDocs,
                collect(DISTINCT nerOne) AS nerOnes,
                collect(DISTINCT nerTwo) AS nerTwos,
                collect(DISTINCT theme) AS themes,
                collect(DISTINCT chunkDocRel) AS chunkDocRels,
                collect(DISTINCT chunkNerOneRel) AS chunkNerOneRels,
                collect(DISTINCT nerOneNerTwoRel) AS nerOneNerTwoRels,
                collect(DISTINCT chunkNerTwoRel) AS chunkNerTwoRels,
                collect(DISTINCT themeToChunkRel) AS themeToChunkRels
            

params : {'_ids': ['#1:0']}

RAM usage goes up (10gb of used ram)

CPU usage goes up (good thing I guess, it's multi threaded confirmed for reading :v )

Image

database dump :

ANOTHERORANO-backup-20260124-081534881.zip

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions