Re: strange tomcat Behavior need urgent help.

2004-12-20 Thread Eric Rotick
This is a MySql problem. It shuts down connections if they have been
idle for too long. You need a pool manager that takes care of this.
Something like c3p0 will do the job.


On Sun, 19 Dec 2004 12:28:09 + (GMT), Krishnakant Mane
[EMAIL PROTECTED] wrote:
 
 
 hello all,
 I am Krishnakant Mane from India.  I own a software
 firm and we generally implement our systems on linux
 and all open source servers like jakarta tomcat and
 apache server in particular.  of late I have been
 facing a strange problem with tomcat.
 I am a tomcat 5 aka 5.0.25 user.  I have deployed an
 database based application using mysql as the
 back-end.  I use mysql jdbc driver to connect to the
 database.
 the application runs fine for a long time.  I check it
 personally for the entire day.  since our developers
 work on the server the entire day, I am sure there is
 that it works.  but when we shut our office and come
 next day morning, the application does not respond.
 what could be the problem.
 it is strange to see that when the server is under
 some kind of a small work load it works absolutely
 fine.  but when we don't touch it for the entire night
 the thing sympally does not work.  does tomcat also
 require warm-up?  haha.
 by the way, I have kept the jdbc (jar) library in the
 common/lib directory as all my applications are
 database based.  is it the right thing to do?
 and lastly what steps should I take to avoid the above
 mentioned problem.  one thing I will like to mention.
 when the application give problem in the morning, it
 responds with just the title and when it comes to the
 database connection it gets stuck I believe.  but when
 I run some console app with the same jdbc driver it
 properly connects to the same database/table.  and the
 application works fine when I reload again.
 Please provide some valuable feedback
 thanks
 Krishnakant.
 
 
 ___
 Win a castle for NYE with your mates and Yahoo! Messenger
 http://uk.messenger.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: strange tomcat Behavior need urgent help.

2004-12-20 Thread Parsons Technical Services
The pool manager built into Tomcat handles this just fine. Also ensure you 
have the latest drivers.

Doug
- Original Message - 
From: Eric Rotick [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, December 20, 2004 7:39 AM
Subject: Re: strange tomcat Behavior need urgent help.


This is a MySql problem. It shuts down connections if they have been
idle for too long. You need a pool manager that takes care of this.
Something like c3p0 will do the job.
On Sun, 19 Dec 2004 12:28:09 + (GMT), Krishnakant Mane
[EMAIL PROTECTED] wrote:

hello all,
I am Krishnakant Mane from India.  I own a software
firm and we generally implement our systems on linux
and all open source servers like jakarta tomcat and
apache server in particular.  of late I have been
facing a strange problem with tomcat.
I am a tomcat 5 aka 5.0.25 user.  I have deployed an
database based application using mysql as the
back-end.  I use mysql jdbc driver to connect to the
database.
the application runs fine for a long time.  I check it
personally for the entire day.  since our developers
work on the server the entire day, I am sure there is
that it works.  but when we shut our office and come
next day morning, the application does not respond.
what could be the problem.
it is strange to see that when the server is under
some kind of a small work load it works absolutely
fine.  but when we don't touch it for the entire night
the thing sympally does not work.  does tomcat also
require warm-up?  haha.
by the way, I have kept the jdbc (jar) library in the
common/lib directory as all my applications are
database based.  is it the right thing to do?
and lastly what steps should I take to avoid the above
mentioned problem.  one thing I will like to mention.
when the application give problem in the morning, it
responds with just the title and when it comes to the
database connection it gets stuck I believe.  but when
I run some console app with the same jdbc driver it
properly connects to the same database/table.  and the
application works fine when I reload again.
Please provide some valuable feedback
thanks
Krishnakant.
___
Win a castle for NYE with your mates and Yahoo! Messenger
http://uk.messenger.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


strange tomcat Behavior need urgent help.

2004-12-19 Thread Krishnakant Mane


hello all,
I am Krishnakant Mane from India.  I own a software
firm and we generally implement our systems on linux
and all open source servers like jakarta tomcat and
apache server in particular.  of late I have been
facing a strange problem with tomcat.
I am a tomcat 5 aka 5.0.25 user.  I have deployed an
database based application using mysql as the
back-end.  I use mysql jdbc driver to connect to the
database.
the application runs fine for a long time.  I check it
personally for the entire day.  since our developers
work on the server the entire day, I am sure there is
that it works.  but when we shut our office and come
next day morning, the application does not respond.
what could be the problem.
it is strange to see that when the server is under
some kind of a small work load it works absolutely
fine.  but when we don't touch it for the entire night
the thing sympally does not work.  does tomcat also
require warm-up?  haha.
by the way, I have kept the jdbc (jar) library in the
common/lib directory as all my applications are
database based.  is it the right thing to do?
and lastly what steps should I take to avoid the above
mentioned problem.  one thing I will like to mention.
when the application give problem in the morning, it
responds with just the title and when it comes to the
database connection it gets stuck I believe.  but when
I run some console app with the same jdbc driver it
properly connects to the same database/table.  and the
application works fine when I reload again.
Please provide some valuable feedback
thanks
Krishnakant.



___ 
Win a castle for NYE with your mates and Yahoo! Messenger 
http://uk.messenger.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: strange tomcat Behavior need urgent help.

2004-12-19 Thread Jan Behrens
Hi Krishnakant,

I think there was a problem with MySQL connections after a certain amount of
time. I am assume that you have defined a Datasource within TC and are using
a connection pool for the connection. If not, I would highly recommend doing
so, especially since your problem could be related to not having a
connection pool. If you do have all of the above I would try adding the
following parameters to your ressource


 

 -Original Message-
 From: Krishnakant Mane [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, December 19, 2004 1:28 PM
 To: [EMAIL PROTECTED]
 Subject: strange tomcat Behavior need urgent help.
 
 
 
 
 hello all,
 I am Krishnakant Mane from India.  I own a software
 firm and we generally implement our systems on linux
 and all open source servers like jakarta tomcat and
 apache server in particular.  of late I have been
 facing a strange problem with tomcat.
 I am a tomcat 5 aka 5.0.25 user.  I have deployed an
 database based application using mysql as the
 back-end.  I use mysql jdbc driver to connect to the
 database.
 the application runs fine for a long time.  I check it 
 personally for the entire day.  since our developers work on 
 the server the entire day, I am sure there is that it works.  
 but when we shut our office and come next day morning, the 
 application does not respond. what could be the problem. it 
 is strange to see that when the server is under some kind of 
 a small work load it works absolutely fine.  but when we 
 don't touch it for the entire night the thing sympally does 
 not work.  does tomcat also require warm-up?  haha. by the 
 way, I have kept the jdbc (jar) library in the common/lib 
 directory as all my applications are database based.  is it 
 the right thing to do? and lastly what steps should I take to 
 avoid the above mentioned problem.  one thing I will like to 
 mention. when the application give problem in the morning, it 
 responds with just the title and when it comes to the 
 database connection it gets stuck I believe.  but when I run 
 some console app with the same jdbc driver it properly 
 connects to the same database/table.  and the application 
 works fine when I reload again. Please provide some valuable 
 feedback thanks Krishnakant.
 
 
   
 ___ 
 Win a castle for NYE with your mates and Yahoo! Messenger 
 http://uk.messenger.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: strange tomcat Behavior need urgent help.

2004-12-19 Thread Jan Behrens
SORRY, HERE IS THE FULL MAIL

Hi Krishnakant,

I think there was a problem with MySQL connections after a certain amount of
time. I am assume that you have defined a Datasource within TC and are using
a connection pool for the connection. If not, I would highly recommend doing
so, especially since your problem could be related to not having a
connection pool. If you do have all of the above I would try adding the
following parameters to your ressource (within your applicationName.xml
file)

ResourceParams name=jdbc/yourJNDIname
parameter
  nameurl/name
 
valuejdbc:mysql://nameOfServer:port/databaseName?autoReconnect=true/value

/parameter
parameter
  namemaxIdle/name
  value15/value
/parameter
parameter
  namemaxActive/name
  value50/value
/parameter
parameter
  namedriverClassName/name
  valuecom.mysql.jdbc.Driver/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
  nameremoveAbandoned/name
  valuetrue/value
/parameter

/ResourceParams

You will have to play around with the values provided above but these have
worked for me so they might be a reasonable starting point. If this doesn't
help, I would suggest searching -- http://lists.mysql.com/java. I think
there must be plenty of posts related to your problem.

HTH, Jan


 

 -Original Message-
 From: Krishnakant Mane [mailto:[EMAIL PROTECTED]
 Sent: Sunday, December 19, 2004 1:28 PM
 To: [EMAIL PROTECTED]
 Subject: strange tomcat Behavior need urgent help.
 
 
 
 
 hello all,
 I am Krishnakant Mane from India.  I own a software
 firm and we generally implement our systems on linux
 and all open source servers like jakarta tomcat and
 apache server in particular.  of late I have been
 facing a strange problem with tomcat.
 I am a tomcat 5 aka 5.0.25 user.  I have deployed an
 database based application using mysql as the
 back-end.  I use mysql jdbc driver to connect to the database.
 the application runs fine for a long time.  I check it 
 personally for the entire day.  since our developers work on 
 the server the entire day, I am sure there is that it works.  
 but when we shut our office and come next day morning, the 
 application does not respond. what could be the problem. it 
 is strange to see that when the server is under some kind of 
 a small work load it works absolutely fine.  but when we 
 don't touch it for the entire night the thing sympally does 
 not work.  does tomcat also require warm-up?  haha. by the 
 way, I have kept the jdbc (jar) library in the common/lib 
 directory as all my applications are database based.  is it 
 the right thing to do? and lastly what steps should I take to 
 avoid the above mentioned problem.  one thing I will like to 
 mention. when the application give problem in the morning, it 
 responds with just the title and when it comes to the 
 database connection it gets stuck I believe.  but when I run 
 some console app with the same jdbc driver it properly 
 connects to the same database/table.  and the application 
 works fine when I reload again. Please provide some valuable 
 feedback thanks Krishnakant.
 
 
   
 ___
 Win a castle for NYE with your mates and Yahoo! Messenger 
 http://uk.messenger.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]