Search code examples
javawindowsdisk

My java application running as a service is causing disk full error on windows 2008. Ca't see anything from the explorer


I have a Java server that I wrote myself running as a service. Right now looks like the application is somehow eating all my drive space at a 1GB per hour rate.

After a stop of the service the disk space becomes available by itself (I'm not deleting anything). From the application I'm not creating any files or writing to disk besides logs or the database but those are not growing so fast.

The big problem with this is that I can't find any file or folder that is eating up all my drive. I don't know if it is a system file that I don't have access to from the explorer or if it's a virus or a JVM bug. I'm using Oracle JVM 64 bit from JDK 7 update 7.

I appreciate a lot any help you can provide me with this. I have never seen something like that before.

Thanks.


Solution

  • Here are the possible pointers:

    1. Check if your disk is full because of other applications (possibly malware)
    2. Check if there are any IO operations from your application
    3. Check if your local repository (like .m2, .gradle/caches) are filling it up during build with transitive dependencies
    4. If possible, add couple of loggers to display the size of your hardisk using new File("/").getTotalSpace(); along with RAM details and watch how they are changing
    5. Finally if nothing works out, try your application in another machine