Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

IOException:Too many open files  RSS feed

 
Pranav Pal
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In my program, I am trying to open a new file for writing.
But while creating the file I am getting the following exception:
IOException:Too many open files.

Contents of the /proc/sys/fs/file-nr while running the program is:
2550 0 736700

Can anybody explain the cause of this exception?

Thanks,
Pranav
 
Rob Spoor
Sheriff
Posts: 21090
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you closing all the streams your opening when you're done with them? Because the error message is pretty self-explanatory - you have opened and not closed too many files / streams.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!