W3C home > Mailing lists > Public > www-jigsaw@w3.org > May to June 1999

Re: Servlets: Too many files open

From: Roland Mainz <Roland.Mainz@informatik.med.uni-giessen.de>
Date: Thu, 06 May 1999 14:33:59 +0200
Message-Id: <37318C36.AC1102BC@informatik.med.uni-giessen.de>
To: W3 Jigsaw Mailinglist <www-jigsaw@w3.org>
Ingo Schubert wrote:

> Hi,
>
> to test some servlets I use Jigsaw 2.0.1. running on JKD 1.1.7. and
> Servlet DK
> 2.0. The OS is Solaris 7  SPARC.
>
> When I open more than 16 Servlets I get the Exception:
> java.net.SocketException: Too many open files
>         at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:379)
>         at java.net.ServerSocket.implAccept(ServerSocket.java:198)
>         at java.net.ServerSocket.accept(ServerSocket.java:181)
>         at org.w3c.jigsaw.http.httpd.run(httpd.java)
>         at java.lang.Thread.run(Thread.java)
>
> How can I tell Jigsaw to use more files?
> I didn't find something in the Admin tool.

Be sure that you close() the output writer at the end of your
doGet/doPost method.
I also had this problem, and it was caused by this (little) small
problem...

Another problem (if you're readding/writing from/to files, don't forget
to close() the
streams/writers, too).

----

On Unix, you can check whether you have a limit of file descriptors. See
the ulimit manual
page.
But I still think that something in your servlet is going wrong...

----

Bye,
Roland

--
  __ .  . __
 (o.\ \/ /.o)  Roland Mainz                               C programmer
  \__\/\/__/   Roland.Mainz@informatik.med.uni-giessen.de MPEG specialist
  /O /==\ O\   gisburn@w-specht.rhein-ruhr.de             Sun&&Amiga programmer
 (;O/ \/ \O;)  TEL +49 (0) 2426901568  FAX +49 (0) 2426901569
Received on Thursday, 6 May 1999 08:33:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:29 GMT