"ffmpeg": java.io.IOException: error=24, Too many open files -
I am working with ffmpeg to create a preview, but I get this error in the middle of the execution of my program :
"ffmpeg": java.io.IOException: error = 24, many open files
Does anyone know how to solve or how to avoid it ?? For piece code where I use ffmpeg:
for (int j = 0; j & lt; temp.length; j ++) {if (j == 2 ) {String preview = temp2 [i] + temp [j] + ".jpg"; Process p = runtime.gettimetime (). Exec ("ffmpeg -i anotados /" + temp2 [i] + "-r1-s 00:00:" + temporary [j] + "-t1-s 158x116 spec" "+ preview); TextOut.write (preview + "\ n"); }}
view your ulimit -n
output See how many open files are generated from that shell, there were 20 files of the historical Unix system, but there are default 1024 open files on my Ubuntu Desktop.
You may need to increase the number of open files allowed in / etc / security /limits.conf
file or, you have to shut down your application more aggressively The open files may need to be modified.
Another possibility is a system-wide limit on the number of files that can be open. I do not know which modern systems still have such limitations, but in the first place, there will be sysctl -a
output (ok, after system transcription, second ) .)
Comments
Post a Comment