You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by sa...@BIRLASOFT.COM on 2009/07/16 11:42:16 UTC
oracle JDBC sessions not closing while tomcat shutdown
Hi
Apache Tomcat is working as a middleware between JAVA and ORACLE
Databse. The problem is that when I am starting the tomcat, each time it
opens 3 JDBC sessions on database level and using those sessions at
application level. But when shutting down the tomcat, it is not
closing/releasing those JDBC sessions from database level. And thus so
many not in use JDBC sessions exists after restarting tomcat many times.
Please let me know how those sessions will close while shutting down the
tomcat or after each restart of tomcat instead of killing them manually
from database level.
Operating System --- HP-UX 11.23
Default web server with OS --- Apache-tomcat 5.5
Default Java --- JAVA 1.5
Database --- Oracle 10.2.0.3.0
Regards
Santosh
******************************************************************************************************************************
"This message and any attachments are solely for the intended recipient and may contain Birlasoft confidential or privileged information. If you are not the intended recipient,any disclosure,copying, use, or distribution of the information included in this message and any attachments is
prohibited. If you have received this communication in error, please notify us by reply e-mail(administrator@birlasoft.com) immediately and permanently delete this message and any attachments. Thank you."
******************************************************************************************************************************
RE: oracle JDBC sessions not closing while tomcat shutdown
Posted by Martin Gainty <mg...@hotmail.com>.
possibly Oracle connection not being released as a result of Oracle misconfiguration ?
http://www.coderanch.com/t/89928/JBoss/Jboss-connection-pool-not-releasing
possibly idle-timeout set to high?
<max-idle-timeout>20000</max-idle-timeout>
?
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Thu, 16 Jul 2009 11:49:14 +0200
> From: miki@ceti.pl
> To: users@tomcat.apache.org
> Subject: Re: oracle JDBC sessions not closing while tomcat shutdown
>
> santosh.singh@BIRLASOFT.COM wrote:
> > Apache Tomcat is working as a middleware between JAVA and ORACLE
> > Databse. The problem is that when I am starting the tomcat, each time it
> > opens 3 JDBC sessions on database level and using those sessions at
> > application level. But when shutting down the tomcat, it is not
> > closing/releasing those JDBC sessions from database level. And thus so
> > many not in use JDBC sessions exists after restarting tomcat many times.
> >
> How can you have JDBC sessions active after Tomcat shutdown? JVM exits,
> so every JDBC connection disappears...
>
> --
> Mikolaj Rydzewski <mi...@ceti.pl>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009
Re: oracle JDBC sessions not closing while tomcat shutdown
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Santosh,
On 7/16/2009 7:27 AM, santosh.singh@BIRLASOFT.COM wrote:
> When I have tried to run the any java program independent of tomcat then
> the opened session is releasing from oracle database.
Probably because you are calling System.exit() in your standalone
program. There are other possibilities, too.
> But the same java program is run via/through tomcat then opened JDBC
> sessions at oracle database level is not releasing.
Take a thread dump and post the results. Marks' suggestion for outside
research was apparently too subtle. I'll save us all the trouble of
prompting you to google for "tomcat thread dump" and reading. I've
written a FAQ entry on this very operation. You can find it here:
http://wiki.apache.org/tomcat/HowTo#head-a3243c1d640297a9f2aa9446cbed434efbd4d1d9
Please read that. Seriously. Take a thread dump. I dare you. And then
post the dump to the list and we'll tell you where your application is
likely to be broken.
> Is there any parameter to modify or to add in tomcat file(s). So, that
> this issue will resolve.
No, Tomcat doesn't have a setting to turn off the "suck bit" on your web
application: you'll have to implement that yourself.
How are you setting up your database connections? Are you using a
Tomcat-managed connection pool? If so, post your configuration.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkpgh08ACgkQ9CaO5/Lv0PDKVQCdGA1DGrORyn56zkto5lW7Ctie
cnIAnRDl2zccR6cVv4kqQtWNSIA2ujU9
=V5Ks
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: oracle JDBC sessions not closing while tomcat shutdown
Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
santosh.singh@BIRLASOFT.COM wrote:
> When I have tried to run the any java program independent of tomcat then
> the opened session is releasing from oracle database.
>
> But the same java program is run via/through tomcat then opened JDBC
> sessions at oracle database level is not releasing.
>
> Is there any parameter to modify or to add in tomcat file(s). So, that
> this issue will resolve.
>
There's an issue with one of your webapps deployed on Tomcat. They are
not shutting down properly.
You need to do a thread dump on Tomcat's JVM after such shutdown to find
out which threads are still running.
--
Mikolaj Rydzewski <mi...@ceti.pl>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: oracle JDBC sessions not closing while tomcat shutdown
Posted by sa...@BIRLASOFT.COM.
Hi
When I have tried to run the any java program independent of tomcat then
the opened session is releasing from oracle database.
But the same java program is run via/through tomcat then opened JDBC
sessions at oracle database level is not releasing.
Is there any parameter to modify or to add in tomcat file(s). So, that
this issue will resolve.
Regards
Santosh
-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org]
Sent: Thursday, July 16, 2009 4:25 PM
To: Tomcat Users List
Subject: Re: oracle JDBC sessions not closing while tomcat shutdown
santosh.singh@BIRLASOFT.COM wrote:
> Hi
>
> Can you give me a small java program to verify about thread dump.
No. This is the point where you have to do a little research on your
own.
Mark
>
> Santosh
>
> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Thursday, July 16, 2009 4:01 PM
> To: Tomcat Users List
> Subject: Re: oracle JDBC sessions not closing while tomcat shutdown
>
> santosh.singh@BIRLASOFT.COM wrote:
>> Hi
>>
>> How can I verify that and while shutting down or restarting tomcat,
>> how it will close.
>
> Do a thread dump when is doesn't shutdown and see what is still
running.
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> **********************************************************************
> ********************************************************
> "This message and any attachments are solely for the intended
> recipient and may contain Birlasoft confidential or privileged
information. If you are not the intended recipient,any
disclosure,copying, use, or distribution of the information included in
this message and any attachments is prohibited. If you have received
this communication in error, please notify us by reply
e-mail(administrator@birlasoft.com) immediately and permanently delete
this message and any attachments. Thank you."
> **********************************************************************
> ********************************************************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
******************************************************************************************************************************
"This message and any attachments are solely for the intended recipient and may contain Birlasoft confidential or privileged information. If you are not the intended recipient,any disclosure,copying, use, or distribution of the information included in this message and any attachments is
prohibited. If you have received this communication in error, please notify us by reply e-mail(administrator@birlasoft.com) immediately and permanently delete this message and any attachments. Thank you."
******************************************************************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: oracle JDBC sessions not closing while tomcat shutdown
Posted by Mark Thomas <ma...@apache.org>.
santosh.singh@BIRLASOFT.COM wrote:
> Hi
>
> Can you give me a small java program to verify about thread dump.
No. This is the point where you have to do a little research on your own.
Mark
>
> Santosh
>
> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Thursday, July 16, 2009 4:01 PM
> To: Tomcat Users List
> Subject: Re: oracle JDBC sessions not closing while tomcat shutdown
>
> santosh.singh@BIRLASOFT.COM wrote:
>> Hi
>>
>> How can I verify that and while shutting down or restarting tomcat,
>> how it will close.
>
> Do a thread dump when is doesn't shutdown and see what is still running.
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> ******************************************************************************************************************************
> "This message and any attachments are solely for the intended recipient and may contain Birlasoft confidential or privileged information. If you are not the intended recipient,any disclosure,copying, use, or distribution of the information included in this message and any attachments is
> prohibited. If you have received this communication in error, please notify us by reply e-mail(administrator@birlasoft.com) immediately and permanently delete this message and any attachments. Thank you."
> ******************************************************************************************************************************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: oracle JDBC sessions not closing while tomcat shutdown
Posted by sa...@BIRLASOFT.COM.
Hi
Can you give me a small java program to verify about thread dump.
Santosh
-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org]
Sent: Thursday, July 16, 2009 4:01 PM
To: Tomcat Users List
Subject: Re: oracle JDBC sessions not closing while tomcat shutdown
santosh.singh@BIRLASOFT.COM wrote:
> Hi
>
> How can I verify that and while shutting down or restarting tomcat,
> how it will close.
Do a thread dump when is doesn't shutdown and see what is still running.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
******************************************************************************************************************************
"This message and any attachments are solely for the intended recipient and may contain Birlasoft confidential or privileged information. If you are not the intended recipient,any disclosure,copying, use, or distribution of the information included in this message and any attachments is
prohibited. If you have received this communication in error, please notify us by reply e-mail(administrator@birlasoft.com) immediately and permanently delete this message and any attachments. Thank you."
******************************************************************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: oracle JDBC sessions not closing while tomcat shutdown
Posted by Mark Thomas <ma...@apache.org>.
santosh.singh@BIRLASOFT.COM wrote:
> Hi
>
> How can I verify that and while shutting down or restarting tomcat, how
> it will close.
Do a thread dump when is doesn't shutdown and see what is still running.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: oracle JDBC sessions not closing while tomcat shutdown
Posted by sa...@BIRLASOFT.COM.
Hi
How can I verify that and while shutting down or restarting tomcat, how
it will close.
Regards
Santosh
-----Original Message-----
From: Mikolaj Rydzewski [mailto:miki@ceti.pl]
Sent: Thursday, July 16, 2009 3:53 PM
To: Tomcat Users List
Subject: Re: oracle JDBC sessions not closing while tomcat shutdown
santosh.singh@BIRLASOFT.COM wrote:
> We are getting same JDBC Sessions at oracle database which has been
> created/pooled while tomcat started. I would also like to update you
> that java.exe is not terminating for the same tomcat. However , we
> have performed proper shutdown of tomcat using shutdown.sh file.
>
So Tomcat is still 'almost' alive. Probably there're some background
threads still running. Thus, JDBC connections are still open.
--
Mikolaj Rydzewski <mi...@ceti.pl>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
******************************************************************************************************************************
"This message and any attachments are solely for the intended recipient and may contain Birlasoft confidential or privileged information. If you are not the intended recipient,any disclosure,copying, use, or distribution of the information included in this message and any attachments is
prohibited. If you have received this communication in error, please notify us by reply e-mail(administrator@birlasoft.com) immediately and permanently delete this message and any attachments. Thank you."
******************************************************************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: oracle JDBC sessions not closing while tomcat shutdown
Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
santosh.singh@BIRLASOFT.COM wrote:
> We are getting same JDBC Sessions at oracle database which has been
> created/pooled while tomcat started. I would also like to update you
> that java.exe is not terminating for the same tomcat. However , we have
> performed proper shutdown of tomcat using shutdown.sh file.
>
So Tomcat is still 'almost' alive. Probably there're some background
threads still running. Thus, JDBC connections are still open.
--
Mikolaj Rydzewski <mi...@ceti.pl>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: oracle JDBC sessions not closing while tomcat shutdown
Posted by sa...@BIRLASOFT.COM.
Hi
We are getting same JDBC Sessions at oracle database which has been
created/pooled while tomcat started. I would also like to update you
that java.exe is not terminating for the same tomcat. However , we have
performed proper shutdown of tomcat using shutdown.sh file.
Regards
Santosh
-----Original Message-----
From: Mikolaj Rydzewski [mailto:miki@ceti.pl]
Sent: Thursday, July 16, 2009 3:19 PM
To: Tomcat Users List
Subject: Re: oracle JDBC sessions not closing while tomcat shutdown
santosh.singh@BIRLASOFT.COM wrote:
> Apache Tomcat is working as a middleware between JAVA and ORACLE
> Databse. The problem is that when I am starting the tomcat, each time
> it opens 3 JDBC sessions on database level and using those sessions at
> application level. But when shutting down the tomcat, it is not
> closing/releasing those JDBC sessions from database level. And thus so
> many not in use JDBC sessions exists after restarting tomcat many
times.
>
How can you have JDBC sessions active after Tomcat shutdown? JVM exits,
so every JDBC connection disappears...
--
Mikolaj Rydzewski <mi...@ceti.pl>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
******************************************************************************************************************************
"This message and any attachments are solely for the intended recipient and may contain Birlasoft confidential or privileged information. If you are not the intended recipient,any disclosure,copying, use, or distribution of the information included in this message and any attachments is
prohibited. If you have received this communication in error, please notify us by reply e-mail(administrator@birlasoft.com) immediately and permanently delete this message and any attachments. Thank you."
******************************************************************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: oracle JDBC sessions not closing while tomcat shutdown
Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
santosh.singh@BIRLASOFT.COM wrote:
> Apache Tomcat is working as a middleware between JAVA and ORACLE
> Databse. The problem is that when I am starting the tomcat, each time it
> opens 3 JDBC sessions on database level and using those sessions at
> application level. But when shutting down the tomcat, it is not
> closing/releasing those JDBC sessions from database level. And thus so
> many not in use JDBC sessions exists after restarting tomcat many times.
>
How can you have JDBC sessions active after Tomcat shutdown? JVM exits,
so every JDBC connection disappears...
--
Mikolaj Rydzewski <mi...@ceti.pl>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org