Caused by: java.nio.file.FileSystemException: ..... : 打开的文件过多

在高并发处理图片的时候出现这个错误。

18:29:37.993 [pool-9-thread-8] ERROR cn.bywin.cbvsp.service.ImageSevice - 切图出错!! 
javax.imageio.IIOException: Can't create cache file!
	at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:423)
	at cn.bywin.cbvsp.service.ImageSevice.pedestriansHandle(ImageSevice.java:88)
	at cn.bywin.cbvsp.service.ImageSevice.builder(ImageSevice.java:46)
	at cn.bywin.cbvsp.service.Customer.lambda$getFrameFromMqQueue$0(Customer.java:93)
	at cn.bywin.cbvsp.service.Customer$$Lambda$828/763195951.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.nio.file.FileSystemException: /data/tempPictureData/imageio9201459741685116845.tmp: 打开的文件过多
	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 javax.imageio.stream.FileCacheImageOutputStream.(FileCacheImageOutputStream.java:90)
	at com.sun.imageio.spi.OutputStreamImageOutputStreamSpi.createOutputStreamInstance(OutputStreamImageOutputStreamSpi.java:68)
	at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:419)
	... 7 common frames omitted

参考: https://blog.csdn.net/zxh87/article/details/8187034 https://www.cnblogs.com/zhouhao666/p/8258166.html main: https://blog.csdn.net/weixin_42273374/article/details/80406000 https://blog.csdn.net/cwfreebird/article/details/51820993?fps=1&locationNum=8 明天再更新!

转载于:https://my.oschina.net/u/4131327/blog/3061246

你可能感兴趣的:(Caused by: java.nio.file.FileSystemException: ..... : 打开的文件过多)