Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Too many open files - A p:graphicImage Error (I guess)

Vandre Caetano
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I an jsf application the user upload photos and I am using primefaces <p:graphicImage> tag to show the photos and <p:fileUpload> to upload then, but when put this code in the production server, it start to get really slow and throws a "too many open files" Error

Do you have any idea what could be possibly wrong?

my code for uploading :

And to read the image:

Of course I found no way to close this fileInputStream so far but I sow its implementation of finalize and it seems the garbage collector should be able to handle it... I guess

Do any of you know who to fix it?

By the way, I'm using glassfish 3.1.2 and the homologation server often behaves differently than the glassfish in my computer.

Thanks in advance
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic