happyfish100 / fastdfs

FastDFS is an open source high performance distributed file system (DFS). It's major functions include: file storing, file syncing and file accessing, and design for high capacity and load balance. Wechat/Weixin public account (Chinese Language): fastdfs
GNU General Public License v3.0
8.97k stars 1.98k forks source link

上传文件出现 java.nio.file.FileSystemException: /opt/temp/cloud-disk/undertow6523975979015572978upload: 打开的文件过多 #627

Open Shawshank-c opened 1 year ago

Shawshank-c commented 1 year ago

上传文件出现 java.nio.file.FileSystemException: /opt/temp/cloud-disk/undertow6523975979015572978upload: 打开的文件过多

Shawshank-c commented 1 year ago

image

Shawshank-c commented 1 year ago

Caused by: java.nio.file.FileSystemException: /opt/temp/cloud-disk/undertow2705854285097884571upload: 打开的文件过多 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.newByteChannel(UnixFileSystemProvider.java:214) at java.nio.file.Files.newByteChannel(Files.java:361) at java.nio.file.Files.createFile(Files.java:632) at java.nio.file.TempFileHelper.create(TempFileHelper.java:138) at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161) at java.nio.file.Files.createTempFile(Files.java:852) at io.undertow.server.handlers.form.MultiPartParserDefinition$MultiPartUploadHandler.beginPart(MultiPartParserDefinition.java:292)

happyfish100 commented 1 year ago

看日志应该是客户端本地文件打开数目超过限制了。 有可能代码中存在文件句柄(资源)泄露问题(打开的文件用完后没有及时close),Linux下可以通过 ls -l /proc/$pid/fd 排查,其中 $pid 为java容器(如tomcat)的进程号。