Java heap space / Neo4j/ Ubuntu 22.04

41 views
Skip to first unread message

goenzoy

unread,
Feb 5, 2025, 1:36:35 PM2/5/25
to Clojure
Hello to everyone, 

Myself I m using Clojure on my Ubuntu box without any problems for a long time 
But after upgrade to Ubuntu 22.04 I do run into problems with DB connection to local Neo4j . (https://github.com/gorillalabs/neo4j-clj
It worked fine on 20.04 but now I m getting constant memory errors 
And if I modify my JVM setup with export _JAVA_OPTIONS=-Xmx4096m as example it only kicks out my terminal session via systemd 
systemd-oomd[1244]: Killed /user.slice/user-1000.slice/us...@1000.service/app.slice/app-org.gnome.Terminal.slice/vte-> 

Does anyone how much memory is needed (or)and do proper tests on Java level because I cannot believe that 32GiG should not be enough even if most of my tests I have done on a 8GiG machine 

Best regards 

Gottfried 

Francis Hitchens

unread,
Feb 8, 2025, 11:22:59 AM2/8/25
to Clojure
Hi,

This seems to be a common complaint that the upgrade from 20.02 to 22.04 causes the OOM killer to become more active. The consensus is that 22.04 uses more memory. So you have three options. Reduce the memory usage on the box by running less, add more memory or increase your swap partition size. Increasing the swap partition size seems the easiest, see link for details https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-22-04.

I would not recommend tuning the OOM killer, it looks complicated and there is nothing worse than finding your linux box has run out of memory and become totally unresponsive.

Regards, Francis.
Reply all
Reply to author
Forward
0 new messages