[JAVA-345] FileNotFoundException - too many open files Created: 03/May/11 Updated: 25/Jun/13 Resolved: 03/May/11 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API |
| Affects Version/s: | 2.5.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Chris Kaempfe | Assignee: | Scott Hernandez (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | GridFSInputFile, insert | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux 64 Bit, Eclipse Helios Service Release 2 |
||
| Description |
|
I'm getting the following error: I'm migrating a Oracle DB to MongoDB. For the work I'm using several threads which reads Orcale and put the information to MongoDB. File file = new File(filePath); inputFile = grid.createFile(file); Is seams that GridFSInputFile is creating an InputStream and after saving the file, the InputStream isn't closed nor is there a method to close the stream. My workaround is: final InputStream is = new FileInputStream(file); finally { is.close(); } |
| Comments |
| Comment by Antoine Girbal [ 03/May/11 ] |
|
thanks for the report we will add the close(). |
| Comment by Scott Hernandez (Inactive) [ 03/May/11 ] |
|
This is a system issue with the number of open files and has nothing to do with the driver. You should increase the number of open file handles that your process is allowed to use; use ulimit -n to do this, or talk to your sysadmin. |