Re: Servlets: Too many files open

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 UTC