0

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.

3
  • Does it create/delete files? They could be in the Recycle Bin, we have had that problem before.
    – BNL
    Sep 7, 2012 at 19:39
  • 1
    What does your java service do?
    – j.w.r
    Sep 7, 2012 at 19:40
  • How do delete a file permanently in java programmatically? Sep 7, 2012 at 19:40

1 Answer 1

0

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
1
  • My app is a TCP nio socket server. My main concern right now is that I have no clue where the space goes to. And why when the server stops the space comes back again. Thanks a lot for helping my out.
    – Heiner
    Sep 7, 2012 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.