Date: Tue, 27 Apr 2004 08:44:42 -0700 (PDT) From: qinsong zhang <zhangqs123@yahoo.com> To: Aditya <aditya@grot.org> Cc: java@freebsd.org Subject: Re: java.net.SocketException: Too many open files Message-ID: <20040427154442.62465.qmail@web40405.mail.yahoo.com> In-Reply-To: <lor7vrnzm0.fsf@mighty.grot.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Adi and Nick and all the experts, I am encournting a problem with Socket when porting a windows socket program to Linux. I know it is Linux not FreeBSD, but just want to get suggestion and advice from you guys. The socket program is running well on Windows2000 server, but onlinux, it's always stuck when receiving bytes from remote ends. When the volumn is very low, it is ok, but just a little high, say 3k, it's stuck and seems deadlock. Any suggestion will be welcome. Thanks in advance, George --- Aditya <aditya@grot.org> wrote: > Hi Nick, > > > On Tue, 16 Mar 2004 23:01:41 -0300, "Nick > Gieczewski" <spam@msn2go.com> said: > > My FreeBSD 4.8-STABLE server is running a Java > server application > > that has recently had an increase in concurrent > users. The JDK is > > jdk-1.4.2p5. Since the user surge, the main thread > has been dying > > repeatedly during peak hours at > ServerSocket.accept() with the > > following message: > > > Exception in thread "main" > java.net.SocketException: Too many open > > files at > java.net.PlainSocketImpl.socketAccept(Native Method) > > > Now, here comes the weird stuff: My system is > _not_ running out of > > file descriptors when this happens (kern.maxfiles > = 16384, > > kern.openfiles = ~630), _nor_ is the per-process > file descriptor > > limit being reached (it's set to unlimited). The > heap is not full, > > either; its maximum size is set to 128 MB and it's > under 60 MB when > > the thread dies. And there's plenty of both > physical and virtual > > memory left. > > I complained about something similar in the diablo > 1.3 JDK package in > a message about a week ago and got no replies: > > > http://lists.freebsd.org/pipermail/freebsd-java/2004-March/001810.html > > the crux of the problem seems to be that there is a > max file > descriptor setting within the JVM that is set to be > very low in the > FreeBSD native JVMs but interestingly enough, not in > the linux ones > which I can run under emulation in FreeBSD. > > This might not be the particular bug in question, > but the test program > does give similar results: > > > http://developer.java.sun.com/developer/bugParade/bugs/4189011.html > > I'd be interested in finding out a solution to this > before 1.5 as that > bug suggests. > > Thanks, > Adi > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040427154442.62465.qmail>