Score:0

Java process consuming too much ram in background, how to remove it?

co flag

My PC has been crashing a lot of times recently, it suddenly stops responding and after a few seconds, it asks me to force quit some apps. At first, I thought it was a problem with VSCode since it always happens when I'm editing something on it, but it recently has happened with other apps like Spotify or my browser.

When I used the top command, I noticed there is this Java process that is consuming more than half of my RAM and I think this could be the reason for the crashes I've been experiencing. The thing is, that I don't know how to get rid of it.

this java process here

I tried killing the process with the kill command hundreds of times, but it keeps appearing there whenever I use the top command. I tried these commands and also manually removed anything related to jdk, openjdk, etc. using the apt-get remove command.

I restarted the computer, and the process is still there. I don't know what else I can do.

pstree says the full command path is /usr/share/elasticsearch/jdk/bin/java, but the elasticsearch folder doesn't even exist in there. I looked with the apt list --installed and did not find any elasticsearch in there. The pstree command only shows this:

enter image description here

redseven avatar
cn flag
check out with `ps aux` to see the entire command (you also can pus `c` in top for that), then you will see the path for tha java app too. But if it starts again and again something starting it, check out with `pstree` what is its parent process.
Gustavo William avatar
co flag
Thanks for answering @redseven, it says full command path is "/usr/share/elasticsearch/jdk/bin/java", but the folder "elasticsearch" doesn't even exist in there. I also looked with the `apt list --installed` and did not find any elasticsearch in there. The `psetree`command only shows [this](https://imgur.com/9zizocG)
redseven avatar
cn flag
So did you installed elasticsearch? It may be running in a container, that's why you don't see the path... `docker ps`
Gustavo William avatar
co flag
Thanks @redseven, there was indeed an elasticsearch container set to start automatically on boot, i changed the restart policy with the command `docker update --restart=no <my-container>` and now it's stopped.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.