From owner-freebsd-java@FreeBSD.ORG Tue Apr 27 08:44:43 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05FD816A4CE for ; Tue, 27 Apr 2004 08:44:43 -0700 (PDT) Received: from web40405.mail.yahoo.com (web40405.mail.yahoo.com [66.218.78.102]) by mx1.FreeBSD.org (Postfix) with SMTP id D60D943D3F for ; Tue, 27 Apr 2004 08:44:42 -0700 (PDT) (envelope-from zhangqs123@yahoo.com) Message-ID: <20040427154442.62465.qmail@web40405.mail.yahoo.com> Received: from [207.245.39.226] by web40405.mail.yahoo.com via HTTP; Tue, 27 Apr 2004 08:44:42 PDT Date: Tue, 27 Apr 2004 08:44:42 -0700 (PDT) From: qinsong zhang To: Aditya In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: spam@msn2go.com cc: java@freebsd.org Subject: Re: java.net.SocketException: Too many open files X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Apr 2004 15:44:43 -0000 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 wrote: > Hi Nick, > > > On Tue, 16 Mar 2004 23:01:41 -0300, "Nick > Gieczewski" 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