Sounds like you might be running out of heap space.
Even if your JVM does not produce thread dumps, you should be able to generate a heap dump. This, with the GC stats, will also give you insight into what is going. Consult your JVM's documentation for how to generate heap dump in binary format. Then download Memory Analyzer and open the heap dump file to see what is taking up memory. Typically, one would use the jmap
command with the proper options. Generating the heap dump will cause your JVM to slow down quite a bit; I've seen it take 30 mins to generate a heap dump 1.5GB large, YMMV.
Also, post your java opts, both from the servers where it is hanging and working fine.
First things first :) back up everything!
For purpose of this example i'll assume your files are in /var/www
change that to whatever it ACTUALLY is on your system.
tar fcvz www-backup.tar.gz /var/www
will create a back up of your existing web environment in a tar file (in case things go wrong you can always retrieve missing files)
Now to find files that have not been accessed in 90 days or so:
cd /var/www
find . -atime 90 -type f -ls
Lists the files on screen with modified times.. this way you can make sure that the files that you are trying to delete are INDEED the files that you WANT to delete. You can pipe that to less so that you can scroll up and down:
find . -atime 90 -type f -ls | less
use up and down arrows to view the list, quit type 'q'.
If everything looks okay:
pwd
make sure you are still in the right working directory.
find . -atime 90 -type f echo rm -f {} \; > doit.sh
this will create a file called doit.sh which will actually contain the removal commands.
Read it once more:
less doit.sh
if all the files look okay for removal then you can run it:
sh doit.sh
Best Answer
On my CentOS, Gentoo, ...
-D
option is already showed in minutes: