Mahesh H Viraktamath
Mahesh H Viraktamath

Reputation: 884

NFS Share File Access Issue

We are running our test environment on AWS and we use NFS (EBS file system) mounts across all the servers to access our files. Multiple java processes access files on this file system. Application server uses different consumers running on other systems to get files processed. And one such consumer converts or files to images, but the issue is that the application server can't access these files (file.exist() is false). Now the strange thing is that it can't access the first image of the file page (files with several pages), but it can access the second page and so on. Many time I observe, odd numbered page images are not accessible, but I can see that the image exists there. So, I think the image conversion process is still accessing the image while application server tries to access it, but the same issue doesn't surface to the even numbered page images. These images reside inside a nested folder, so the conversion process also creates the folder structure and then writes them into those folders. Any idea what may be the issue here? Anyone facing this issue with NFS shares on AWS?

Upvotes: 0

Views: 1068

Answers (1)

Vorsprung
Vorsprung

Reputation: 34327

It depends on the expected behaviour of your application

NFS works great with readonly systems or with programs that have a low demand on the timely updating of data

See this question for more details Alternative to File.exists() in Java

You might like to consider an alternative to NFS such as AWS EFS or the open source Gluster

Upvotes: 1

Related Questions