How to set java ParallelGCThreads on WSL for my EC2 instance?

So i keep running into this problem and i’m beyond my wits ends about it, i’m trying to see if my messages are being consumed through kafka consumer however whenever i try run it from my ec2 instance it comes up with the following error

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Killed

and by checking it

java -XX:+PrintFlagsFinal | grep ParallelGCThreads
    uintx ParallelGCThreads = 0

How do i set this figure to be atleast 1 since it keeps throwing this same error

Sorry i mainly use python therefore this is a bit out of my depth and searched for awhile

Leave a Comment