cancel
Showing results for 
Search instead for 
Did you mean: 

OutOfMemory issue when using Neo4j driver

hiliulu
Node

I have an application to save hive table/column lineage to Neo4j。
OOM issue often appears once a day or twice a day

The application is running on docker with 4Core CPU 7G memory。
As shown in the attachment, when oom occurs , the java dump file shows that there are lots of 'org.neo4j.driver.internal.shaded.io.netty.channel.nioNioEventLoop' 。

I am using Neo4j Driver with Spring like this:

@Component
public class Neo4jDriver implements AutoCloseable{
    @Getter
    private Driver driver;

    @PostConstruct
    public void init(){
        driver = GraphDatabase.driver( uri, AuthTokens.basic( user, password ) );
    }


    @Override
    public void close() throws Exception {
        driver.close();
    }
}

@Component
public class LineageInfoDao {

    @Resource
    private Neo4jDriver neoDriver;

   public void buildLineageInfo(LineageInfo lineageInfo) {

      
        try (Session session = neoDriver.getDriver().session()) {
            session.writeTransaction(tx ->
            {
                mergeTable(tx, lineageInfo);
                mergeColumn(tx, lineageInfo);
                return true;
            });
        }
    
    }

}

Any clue?


0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.