Dhis2 random source and JAVA_OPTS

I’ve seen this article https://www.baeldung.com/java-security-egd
I’m still hosting older version (java 8 based) and sometimes get stuck.

Since I can’t find the manual of this older version, was there recommendation in these installation to switch the random source to a non blocking one like bellow ?

-Djava.security.egd=file:/dev/./urandom

also found on these recommendation garbage collection

are they still relevant ?

1 Like

Trying to answer from the github repo content

Only found this

1 Like

Hi Stephen.

Like you, I was seeing occasional problems of slow startup of the jvm, which is why I added that alternative source of randomness some years ago. It cured the problem. To be honest I have not followed up how relevant it still is today, but it doesnt seem tio do any harm :-). What has been your experience?

Sorry I had mised that earlier post regarding the memory problems. It sound like his postgres was probably over allocating memory.

To be honest I have not reviewed JAVA_OPTs as used in dhis2 server tools for some time, but rather left well alone. We will review this week.

Cheers
Bob

2 Likes

@Stephan_Mestach I can’t speak to officially recommended practice, but we sometimes make use of setting java.security.egd to file:/dev/./urandom; it can even be required in some operation system/[virtual] hardware configurations for obtaining an entropy value. Debates about the “true randonmess” of /dev/urandom aside, it is an acceptable workaround.

1 Like