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>
      <name>url</name>
 
<value>jdbc:mysql://nameOfServer:port/databaseName?autoReconnect=true</value
>
    </parameter>
    <parameter>
      <name>maxIdle</name>
      <value>15</value>
    </parameter>
    <parameter>
      <name>maxActive</name>
      <value>50</value>
    </parameter>
    <parameter>
      <name>driverClassName</name>
      <value>com.mysql.jdbc.Driver</value>
    </parameter>
    <parameter>
      <name>maxWait</name>
      <value>10000</value>
    </parameter>
    <parameter>
      <name>removeAbandoned</name>
      <value>true</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]

Reply via email to