Menu

#2 Too many open file descriptors issue with jtpl

v1.0 (example)
open
None
9
2015-03-11
2015-02-20
keshav
No

We are facing 'Too many open file descriptors' issue with jtpl. It seems this may be because of unnecessary creation of FileReader object in Template constructor.

Looking into Template.java code in latest trunk -

public Template(File templateFile) throws FileNotFoundException {
FileReader r = new FileReader(templateFile);
try {
t = new Jtpl(templateFile);
} catch (IOException e) {
try {
r.close();
} catch (Exception nothingToDoAboutIt) {}
}
}

It seems that there was unnecessary creation of FileReader object was happening which is never used and that reader object is getting closed in catch block which may not get called.

Please check into this and or any other place which can cause this File Descriptors issue.

Discussion

  • keshav

    keshav - 2015-03-04

    Please provide any comments on this bug.

     
  • keshav

    keshav - 2015-03-11

    Please provide any comments on this bug.

     

Log in to post a comment.

MongoDB Logo MongoDB