Preventing Random Hangs On LinuxIf your Java application is hanging randomly on Linux, add this Java property on the command-line:
DetailsJava on Linux sometimes needs a random number. It reads from /dev/random to get a random number from the OS.
Unfortunately /dev/random is a strict random number generator that returns random numbers based on system events. If there isn't enough system activity, /dev/random blocks, causing your whole application to block!
The solution is to switch to /dev/urandom, which always returns a
number immediately. The number may not be perfectly random but for
most applications this isn't a concern. To instruct the JVM to use
/dev/urandom, add this command-line parameter:
Copyright © 2016 Andrew Oliver