Reinstall 21 WITHOUT lossing data

I actually meant a little more than just “killall -9 java”. Something is obviously starting the process and apparently respawning it as needed. You’ll need to figure out what that is and, IF SAFE, configure it not to start. Try ps aux | grep java to get the parameters, which may give a hint about what is starting it up.

I did and got this gibberish

" jon 82645 16.1 37.9 4755996 1514652 pts/0 SLl+ 16:33 1:28 /usr/share/elasticsearch/jdk/bin/java -Xshare:auto -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -XX:+ShowCodeDetailsInExceptionMessages -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.locale.providers=SPI,COMPAT -Xms1g -Xmx1g -XX:+UseG1GC -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -Djava.io.tmpdir=/tmp/elasticsearch-838871971417949414 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Des.cgroups.hierarchy.override=/ -Xms1024M -Xmx1024M -XX:MaxDirectMemorySize=536870912 -Des.path.home=/usr/share/elasticsearch -Des.path.conf=/usr/share/elasticsearch/config -Des.distribution.flavor=oss -Des.distribution.type=docker -Des.bundled_jdk=true -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -Ediscovery.type=single-node -Ebootstrap.memory_lock=true"

That’s not gibberish. Thats the parameters. You’re running something called “elasticsearch”.

Seems to be this;

And its eating up 1.5 GB of your RAM (1514652 kB)

OK but…How do we fix that?

How about uninstalling it? How (or why?) did you install it in the first place?

I tred to “sudo apt purge” it but it did not work. also I don’t remember installing it. any other ideas?

What is the source of this VM? Did you not set it up? I would think you’d remember installing some weird 3rd party software.

All I can tell you is I installed nextcloud 21 on this VM ruining Ubuntu 20.04 on XCP-ng with a script and now it’s acting slow 6 months later.

Maybe try following this; How to Uninstall Elasticsearch on Linux | ObjectRocket

Hmmmmmmmmm. I tried everything in that artifact and its still a little slow(also java is still ruining at 40% memory). it also did’nt see it when doing apt purge.

Well, if you can’t get rid of the memory hog, then I can only suggest that you increase resources. Give more memory to that VM so that it doesn’t swap so badly.

Hmm. I guess is is working a little faster now. I guess this is the best it will do.

Thank you everyone! :grinning:

Im running on a pi! :wink: works great (for me) client side having some issues i cant fathom yet.

Well big thing is that everybody’s needs are different, and you’re obviously not running elasticsearch, since that would murder your hardware instantly.

Had similar problem in the past. Solved by:

  • a much greater swap size
  • checking AV virus scanner settings. It is server depended what setting to use. The default settings are not to be trusted.

That won’t solve anything. You don’t want more swap, you want more RAM. The more you depend on swap to replace RAM, the slower it will be.

And as for “AV virus scanner”… what?

RAM + SWAP is what you need. If that is not enough, things go wrong in an unpredicted way.

And AV scan could also give trouble if you’ve activated that. The default settings are not suitable for a server that hosts multiple domains an d clients. In fact, our CENTOS server got ‘crazy’ and walked out of memory.
I needed to set this for our server:
Modus: Clam AV Deamon
Host: localhost
Port: 3310
Stream lenght: 26214400 bytes
limit: -1
action: remove archive or ‘log only’

We run multiple NC installs on the same server.
RAM: 7.6 GB and 4.8 in use now
SWAP: 8 GB and 4.9 in use now.
PHP 7.4 with 1GB memory limit
MySQL 10.4.18
(You can find this info as NC admin under ‘System’)