Re: too many open files

"Victor Trevino Trevi?o-Alvarado" <[email protected]>
Newsgroups gmane.comp.web.webobjects.admin
Message-ID <[email protected]>
Hi everyone, I have seen several messages of "too many open files". However, I have not seen anything about "sockets" or transmitions betweeen app server and webserver. Every communication has internally file descriptors and it could cause "too many open files" as well. I our case the CONNECTION POOL was helpful. In the case of systematic operations with files (that is our case as well). We implement a "buffer" of "recently used file handles", so when we need open a file we use an already used handler instead of creating a new one.

Good Luck !

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
mc,ing.Víctor M. Treviño A.

[email protected]

[email protected]

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

>From: Pierre Frisch >To: David Teran >CC: WebObjects Admin , Georg Tuparev >Subject: Re: too many open files >Date: Wed, 11 Feb 2004 10:28:02 -0800 > >Hi David, > >What is not clear is how the GC would garbage collect file >descriptors. They are probably very small objects and if the >application is not in a tight memory situation there is no reason >the GC would run. Don't forget we are hitting the max file >descriptor limit not the memory limit. > >Pierre > >On Feb 11, 2004, at 9:57, David Teran wrote: > >>Hi Georg, >> >>thats a very interesting observation! In fact calling the GC >>manually is not recommended and i wonder if your app is using a lot >>of FileWriter instances. In every case this might be a bugreport >>because before throwing such an exception the VM should make clear >>that there are no uncollected instances which can be collected to >>prevent such an exception. >> >>Can you check this example on another OS like Linux / Solaris ? >> >>regards David >> >>On 11.02.2004, at 18:46, Georg Tuparev wrote: >> >>>Pierre, >>> >>>On Feb 11, 2004, at 2:43 PM, Pierre Frisch wrote: >>> >>>>Can you be a bit more explicit? >>> >>>Sure >>> >>>>Each process on MacOS has a limit of 256 open files you must have >>>>open an awful number file to reach that limit? >>> >>>Well, in my case (I had this headache few months ago) I was >>>opening a huge file containing bank transactions, and I was >>>splitting them by account (one file for each account). All >>>transactions are sorted - so at any time I had max two files >>>opened (the source file, and the current account file). This was >>>done in a loop over all accounts. For each output file we do >>>something like this: >>> >>>FileWriter w = new FileWriter(new File(fileName)); >>>// Write some data >>>w.flush(); >>>w.close(); >>>w = null; >>> >>>One would think this is enough... wrong! We had to kick the GC in >>>order to really free the file handles. Fun, isn't it? >>> >>>>Or is there another mechanism? Are the file handle in static >>>>methods? >>> >>>In the case of the new application that start making trouble two >>>weeks ago, there were some reads (both in static and instance >>>methods) done using WOResourceManager (some custom SQL, image data >>>etc), and some files similar to what I described above. In both >>>cases they all were closed properly, but we had to kick the GC >>>again. >>> >>> >>>WO 6.0 will be in Objective-C >>> >>> >>>-- georg -- >>> >>>"War is God's way of teaching Americans about geography." >>>Ambrose Bierce, wriiter (1842-1914) >>> >>>_______________________________________________ >>>WebObjects-admin mailing list >>>[email protected] >>>http://www.omnigroup.com/mailman/listinfo/webobjects-admin >>> >>> >> >>_______________________________________________ >>WebObjects-admin mailing list >>[email protected] >>http://www.omnigroup.com/mailman/listinfo/webobjects-admin ><< smime.p7s >> >_______________________________________________ >WebObjects-admin mailing list >[email protected] >http://www.omnigroup.com/mailman/listinfo/webobjects-admin

----------
Protect your PC - Click here for McAfee.com VirusScan Online

_______________________________________________
WebObjects-admin mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/webobjects-admin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.