• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.io.FileNotFoundException: Too many open files

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Here is my code to copy file

Error that am facing is:


Thanks in anticipation
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I can see, the code that you posted doesn't have anything to do with your error message. Here's the relevant part of the stack trace:



Notice that the classes and mentioned in that stack trace are not in the code which you posted.
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul Clapham for your favorable reply. Actually the referred classes are using this copy method and exist in the class from where this copyFile method called

I googled and found this problem not belongs to my code but appearing due to Linux as permission to view number of files were 1024 whereas I was trying to copy 50500 files. I used the following to fix it:


Increase open files and max user processes:


Presently it seems the problem fixed but am still waiting to be sure 100%

Thanks again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic