We are using Ubuntu server and Java 8 with Spring Boot 1.4.2 release with Docker deployment in Ubuntu. In a folder /home/tempAttachment there are 100 millions of directories and the code:
public synchronized static File getFile(String filePath) throws IOException
{
java.nio.file.Path files12 = null;
File tempFile= new File(filePath);
if(!tempFile.getParentFile().exists())
{
files12 = java.nio.file.Files.createDirectories(java.nio.file.Paths.get(tempFile.getParentFile().getAbsolutePath()));
tempFile= files12.toFile();
}
return tempFile;
}
Gives an error below:
java.nio.file.FileSystemException: /home/TempAttachment/email/plain-2f298db6-6ce0-471a-869d-7cb18fd5f351: No space left on device
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
at java.nio.file.Files.createDirectory(Files.java:674)
We are trying to reproduce this error in production in our local laptop, but not able to reproduce. Please help