You should try to figure out why you are getting closed connections.  Is
there a chance the driver/db closed them due to a long idle period?  If so,
there is an idle timeout you can set, although with 2.4 you also have to
set many other parameters to get it to work (I think GCEnabled, GCInterval,
IdleTimeout).

thanks
david jencks

On 2002.06.30 23:50:42 -0400 John Moore wrote:
> 
> If I get a connection  from a DataSource and isClosed() == true, should I
> A)
> call conn.close() B) set conn=null, C) call conn.close() then set
> conn=null,
> or D) leave conn alone and handle the problem myself?  Option 'C' seems
> like
> the right thing to do but it logs a exception into the log file and I'm
> not
> sure if everything is being handled correctly from that point out.
> Currently, I do C then go tray again (which usually works) and throw an
> exception if it fails the 2nd time.  Database is Sybase SQLAnywhere 5.5
> using JConnect 5.5 on JBoss 2.4.6 w/ Tomcat 4.0.3.   
> 
> Thanks,
> John
> 
> 
> -----Original Message-----
> From: Claudio Miranda [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 28, 2002 8:10 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Restart JBoss After Out of Memory
> 
> 
> 
>   Hello Hunter,
>    
>   Are you using jdk1.3.1_03 with
> -server enabled ?
>   Your machine is SMP ?
> 
>   Didi you configured some OS
> parameters (ulimit, file-max) ?
> 
>   I experimented RH 7.2 (4GB RAM, but
> sun jdk scales util 2GB - very poor),
> jdk1.3.1_02 -server, SMP, JBoss 2.4.6,
> without OS parameters customized,  and
> after 5 min, my JBoss freezed, this
> happened 3 consecutive times. Then I
> switched back to -client JDK parameter.
> 
>   In run.sh script, I don't known why,
> but the hotspot test, doesn't enable
> -server.
> 
> 
> Claudio Miranda
>  
> 
> > From: Hunter Hillegas
> > Subject: [JBoss-user] Restart JBoss
> After Out of Memory
> > Date: Thu, 27 Jun 2002 13:41:46 -0700
> > 
> > Every once and awhile my JBoss 3.0
> (Red Hat 7.2 / Sun 1.3.1_03 JVM) 
> > server will die. I assume that it is
> running out of memory.
> > 
> > We specify up to 800MB of RAM at
> JBoss start up... Our applications 
> > get tons and tons of hits. I need to
> profile our app in JBoss and see
> > where memory is leaking...
> > 
> > In the meantime, I'm wondering if
> anyone has developed a script of 
> > daemon that would restart JBoss if
> it died? Anyone done anything like
> > that?
> > 
> > Hunter
> 
>  
> ---
> UOL na Copa 2002 - As principais notícias estão em UOL Esporte
> http://esporte.uol.com.br/copa/
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Caffeinated soap. No kidding.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
> <TITLE>Connection from DataSource Already Closed</TITLE>
> </HEAD>
> <BODY>
> <BR>
> 
> <P><FONT SIZE=2>If I get a connection&nbsp; from a DataSource and
> isClosed() == true, should I A) call conn.close() B) set conn=null, C)
> call conn.close() then set conn=null, or D) leave conn alone and handle
> the problem myself?&nbsp; Option 'C' seems like the right thing to do but
> it logs a exception into the log file and I'm not sure if everything is
> being handled correctly from that point out.&nbsp;&nbsp; Currently, I do
> C then go tray again (which usually works) and throw an exception if it
> fails the 2nd time.&nbsp; Database is Sybase SQLAnywhere 5.5 using
> JConnect 5.5 on JBoss 2.4.6 w/ Tomcat 4.0.3.&nbsp;&nbsp; </FONT></P>
> 
> <P><FONT SIZE=2>Thanks,</FONT>
> <BR><FONT SIZE=2>John</FONT>
> </P>
> <BR>
> 
> <P><FONT SIZE=2>-----Original Message-----</FONT>
> <BR><FONT SIZE=2>From: Claudio Miranda [<A
> 
>HREF="mailto:[EMAIL PROTECTED]";>mailto:[EMAIL PROTECTED]</A>]</FONT>
> <BR><FONT SIZE=2>Sent: Friday, June 28, 2002 8:10 AM</FONT>
> <BR><FONT SIZE=2>To: [EMAIL PROTECTED]</FONT>
> <BR><FONT SIZE=2>Subject: Re: [JBoss-user] Restart JBoss After Out of
> Memory</FONT>
> </P>
> <BR>
> <BR>
> 
> <P><FONT SIZE=2>&nbsp; Hello Hunter,</FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp; </FONT>
> <BR><FONT SIZE=2>&nbsp; Are you using jdk1.3.1_03 with</FONT>
> <BR><FONT SIZE=2>-server enabled ?</FONT>
> <BR><FONT SIZE=2>&nbsp; Your machine is SMP ?</FONT>
> </P>
> 
> <P><FONT SIZE=2>&nbsp; Didi you configured some OS</FONT>
> <BR><FONT SIZE=2>parameters (ulimit, file-max) ?</FONT>
> </P>
> 
> <P><FONT SIZE=2>&nbsp; I experimented RH 7.2 (4GB RAM, but</FONT>
> <BR><FONT SIZE=2>sun jdk scales util 2GB - very poor),</FONT>
> <BR><FONT SIZE=2>jdk1.3.1_02 -server, SMP, JBoss 2.4.6,</FONT>
> <BR><FONT SIZE=2>without OS parameters customized,&nbsp; and</FONT>
> <BR><FONT SIZE=2>after 5 min, my JBoss freezed, this</FONT>
> <BR><FONT SIZE=2>happened 3 consecutive times. Then I</FONT>
> <BR><FONT SIZE=2>switched back to -client JDK parameter.</FONT>
> </P>
> 
> <P><FONT SIZE=2>&nbsp; In run.sh script, I don't known why,</FONT>
> <BR><FONT SIZE=2>but the hotspot test, doesn't enable</FONT>
> <BR><FONT SIZE=2>-server.</FONT>
> </P>
> <BR>
> 
> <P><FONT SIZE=2>Claudio Miranda</FONT>
> <BR><FONT SIZE=2>&nbsp;</FONT>
> </P>
> 
> <P><FONT SIZE=2>&gt; From: Hunter Hillegas</FONT>
> <BR><FONT SIZE=2>&gt; Subject: [JBoss-user] Restart JBoss</FONT>
> <BR><FONT SIZE=2>After Out of Memory</FONT>
> <BR><FONT SIZE=2>&gt; Date: Thu, 27 Jun 2002 13:41:46 -0700</FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; Every once and awhile my JBoss 3.0</FONT>
> <BR><FONT SIZE=2>(Red Hat 7.2 / Sun 1.3.1_03 JVM) </FONT>
> <BR><FONT SIZE=2>&gt; server will die. I assume that it is</FONT>
> <BR><FONT SIZE=2>running out of memory.</FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; We specify up to 800MB of RAM at</FONT>
> <BR><FONT SIZE=2>JBoss start up... Our applications </FONT>
> <BR><FONT SIZE=2>&gt; get tons and tons of hits. I need to</FONT>
> <BR><FONT SIZE=2>profile our app in JBoss and see</FONT>
> <BR><FONT SIZE=2>&gt; where memory is leaking...</FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; In the meantime, I'm wondering if</FONT>
> <BR><FONT SIZE=2>anyone has developed a script of </FONT>
> <BR><FONT SIZE=2>&gt; daemon that would restart JBoss if</FONT>
> <BR><FONT SIZE=2>it died? Anyone done anything like</FONT>
> <BR><FONT SIZE=2>&gt; that?</FONT>
> <BR><FONT SIZE=2>&gt; </FONT>
> <BR><FONT SIZE=2>&gt; Hunter</FONT>
> </P>
> 
> <P><FONT SIZE=2>&nbsp;</FONT>
> <BR><FONT SIZE=2>---</FONT>
> <BR><FONT SIZE=2>UOL na Copa 2002 - As principais notícias estão em UOL
> Esporte</FONT>
> <BR><FONT SIZE=2><A HREF="http://esporte.uol.com.br/copa/";
> TARGET="_blank">http://esporte.uol.com.br/copa/</A></FONT>
> </P>
> <BR>
> <BR>
> 
> <P><FONT SIZE=2>-------------------------------------------------------</FONT>
> <BR><FONT SIZE=2>This sf.net email is sponsored by:ThinkGeek</FONT>
> <BR><FONT SIZE=2>Caffeinated soap. No kidding.</FONT>
> <BR><FONT SIZE=2><A HREF="http://thinkgeek.com/sf";
> TARGET="_blank">http://thinkgeek.com/sf</A></FONT>
> <BR><FONT SIZE=2>_______________________________________________</FONT>
> <BR><FONT SIZE=2>JBoss-user mailing list</FONT>
> <BR><FONT SIZE=2>[EMAIL PROTECTED]</FONT>
> <BR><FONT SIZE=2><A HREF="https://lists.sourceforge.net/lists/listinfo/jboss-user";
> TARGET="_blank">https://lists.sourceforge.net/lists/listinfo/jboss-user</A></FONT>
> </P>
> 
> </BODY>
> </HTML>
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to