Re: static objects, server.xml and preventing running out of available file descriptors

2006-09-25 Thread Leon Rosenberg
thats probably true (depends on what lies under the bufferedreader/stream, you probably mean a file?) But its generally extremely bad taste to rely on gc when you can fix it by adding a three-liner. that would also expain why your open files become closed after System.gc() is called. However, yo

Re: static objects, server.xml and preventing running out of available file descriptors

2006-09-25 Thread Mladen Adamovic
Martin Gainty wrote: I think you may have what Leon called a 'resource allocation issue' that may not be corrected until you actually look at the code to determine who or what is grabbing all of the file handles (and not closing them) Yeah, but if one uses BufferedReader br=new BufferedRea

Re: static objects, server.xml and preventing running out of available file descriptors

2006-09-25 Thread Martin Gainty
age - From: "Mladen Adamovic" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, September 25, 2006 4:51 AM Subject: Re: static objects, server.xml and preventing running out of available file descriptors >I prepared one bash script which aim is to reboot t

Re: static objects, server.xml and preventing running out of available file descriptors

2006-09-25 Thread Mladen Adamovic
I prepared one bash script which aim is to reboot the computer if its web server is down for approx. 30 minutes. I think that bash script might be useful for others on this list, so I'm posting it here. But, I'm not sure what is the best way to run that script. I'm using Suse 9.3 on the server.

Re: static objects, server.xml and preventing running out of available file descriptors

2006-09-24 Thread Mladen Adamovic
Darryl Miles wrote: Also, I've put in /etc/profile.local the line "ulimit -n 8192", hoping it will help. WARNING: If you are unix the JVM uses the select() then increasing the ulimit above the default 1024 maybe dangerous. Is it dangerous in Linux also? -- Mladen Adamovic http://www.on

Re: static objects, server.xml and preventing running out of available file descriptors

2006-09-24 Thread Darryl Miles
Mladen Adamovic wrote: Also, I've put in /etc/profile.local the line "ulimit -n 8192", hoping it will help. WARNING: If you are unix the JVM uses the select() then increasing the ulimit above the default 1024 maybe dangerous. This is because the default select() usage set only allocates enou

Re: static objects, server.xml and preventing running out of available file descriptors

2006-09-24 Thread Mladen Adamovic
I've put System.gc() in one place in the code and I'm seeing that "lsof | wc -l" shows that my web application uses less file descriptors as time go on :) I hope the server won't run out of available file descriptors in the future. Also, I've put in /etc/profile.local the line "ulimit -n 8192"

Re: static objects, server.xml and preventing running out of available file descriptors

2006-09-24 Thread Leon Rosenberg
Hi Mladen, On 9/24/06, Mladen Adamovic <[EMAIL PROTECTED]> wrote: Leon Rosenberg wrote: >> I use WordNetProcessor in many JSP files and it seems if I use it in >> static way using >> <%! static WordNetProcessor wordNetProcessor=new WordNetProcessor(); %> >> it won't lock many files. > > then you

Re: static objects, server.xml and preventing running out of available file descriptors

2006-09-24 Thread Mladen Adamovic
Leon Rosenberg wrote: I use WordNetProcessor in many JSP files and it seems if I use it in static way using <%! static WordNetProcessor wordNetProcessor=new WordNetProcessor(); %> it won't lock many files. then your WordNetProcessor class is probably buggy. Maybe you should show us your code to

Re: static objects, server.xml and preventing running out of available file descriptors

2006-09-23 Thread Leon Rosenberg
On 9/23/06, Mladen Adamovic <[EMAIL PROTECTED]> wrote: Hi all! Hi I have many problems recently with java.io.IOException: Too many open files on my Tomcat server for /Online Utility/ (http://www.online-utility.org) web site. The server runs Linux (Suse 9.3). M

static objects, server.xml and preventing running out of available file descriptors

2006-09-23 Thread Mladen Adamovic
Hi all! I have many problems recently with java.io.IOException: Too many open files on my Tomcat server for /Online Utility/ (http://www.online-utility.org) web site. The server runs Linux (Suse 9.3). My web server stop running when runs out of available file de