Re: Tomcat problems every morning.

2003-06-02 Thread Jason Bainbridge
On Mon, 2 Jun 2003 01:31, Hemendra Rana wrote:
> I am running Tomcat 4.1.24 server on Linux and every morning I get the
> following exception. Things work perfectly fine throughout the day after
> I restart the Tomcat server. Any ideas? Could this be a logger issue,
> because my server logs rotate every night.
>
> 2003-06-01 08:32:31 ApplicationDispatcher[] Servlet.service() for
> servlet jsp threw exception
> org.apache.jasper.JasperException: Communication link failure:
> java.io.IOException

Don't think it's a logger issue... Are your JSP's accessing a database or a 
remote server for some other reason? Looking through Google that error is 
usually thrown through JDBC, so it could well be something on the database 
end causing it.

Regards,
-- 
Jason Bainbridge
KDE Web Team - http://kde.org 
[EMAIL PROTECTED] 

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



Re: Tomcat problems every morning.

2003-06-02 Thread Hollerman Geralyn M
On Sun, 01 Jun 2003 10:31:15 -0700, Hemendra Rana wrote
 
> I am running Tomcat 4.1.24 server on Linux and every morning I get 
> the following exception. Things work perfectly fine throughout the 
> day after I restart the Tomcat server. Any ideas? Could this be a 
> logger issue, because my server logs rotate every night.
...
> 2003-06-01 08:32:31 ApplicationDispatcher[] Servlet.service() for 
> servlet jsp threw exception
> org.apache.jasper.JasperException: Communication link failure: 
> java.io.IOException

I had this same error using 4.1.12 - it seemed like it would happen after
about every 8 hours - a default timeout, perhaps? I was never able to find the
reason for it - the advice I got was to re-start the server every morning, and
I really don't like doing that...

Any ideas?

Thanks!


Lynn Hollerman.


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



Re: Tomcat problems every morning.

2003-06-02 Thread Hemendra Rana
Are you using mysql database on the backend too. Someone here pointed out that by default, mysql driver times out after every 8 hours. I still needs to verify whether that is the cause of my problem though. Will let you know of my finds.

Hemendra

Hollerman Geralyn M wrote:

On Sun, 01 Jun 2003 10:31:15 -0700, Hemendra Rana wrote

 

I am running Tomcat 4.1.24 server on Linux and every morning I get 
the following exception. Things work perfectly fine throughout the 
day after I restart the Tomcat server. Any ideas? Could this be a 
logger issue, because my server logs rotate every night.
   

...
 

2003-06-01 08:32:31 ApplicationDispatcher[] Servlet.service() for 
servlet jsp threw exception
org.apache.jasper.JasperException: Communication link failure: 
java.io.IOException
   

I had this same error using 4.1.12 - it seemed like it would happen after
about every 8 hours - a default timeout, perhaps? I was never able to find the
reason for it - the advice I got was to re-start the server every morning, and
I really don't like doing that...
Any ideas?

Thanks!

Lynn Hollerman.

-
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: Tomcat problems every morning.

2003-06-02 Thread Hollerman Geralyn M
On Sun, 01 Jun 2003 18:14:05 -0700, Hemendra Rana wrote
> Are you using mysql database on the backend too. Someone here 
> pointed out that by default, mysql driver times out after every 8 
> hours. I still needs to verify whether that is the cause of my 
> problem though. Will let you know of my finds.

Why, yes, I am. And I thought perhaps MySQL was the problem - but I was told
by some people using Oracle and PostgreSQL databases that they'd seen the
problem as well. I tried putting in some code to set the driver time-out
value, but evidently I didn't do it correctly, as the problem persisted. I
don't see the error with versions of Tomcat previous to 4.1.x, tho.

Lynn Hollerman.


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



RE: Tomcat problems every morning.

2003-06-02 Thread Paul \(BRI\)
My comment won't be that helpful - but I started out at the same place -
each morning I came in a got a call from staff saying the pages with
content pulled from the dbase was down. 

One thing I know, as others suggested, it has to do with the
JDBC/connection - in our case it happens when the network connection
between our linux box and our sql box os broken at some point - I think
the ISP does late night maintenance on the line (this is setup on an
office DSL line). We are still working to isolate the problem - but it
does seem to be JDBC related. I have tried simply pulling the cable on
the back of one box for a few seconds and the connection does die and
will not reconnect.

I plan to post back to the group when we get a better sense of the
problem - we are still fooling with it. In our case we are using MSSQL
with the MS JDBC driver. I thought I saw a post somewhere that said the
mySQL driver had a autoReconnect=true setting - I think I saw it on the
Apache site.

I hope you figure things out.

Paul

-Original Message-
From: Hollerman Geralyn M [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 01, 2003 9:07 PM
To: Tomcat Users List
Subject: Re: Tomcat problems every morning.


On Sun, 01 Jun 2003 18:14:05 -0700, Hemendra Rana wrote
> Are you using mysql database on the backend too. Someone here
> pointed out that by default, mysql driver times out after every 8 
> hours. I still needs to verify whether that is the cause of my 
> problem though. Will let you know of my finds.

Why, yes, I am. And I thought perhaps MySQL was the problem - but I was
told by some people using Oracle and PostgreSQL databases that they'd
seen the problem as well. I tried putting in some code to set the driver
time-out value, but evidently I didn't do it correctly, as the problem
persisted. I don't see the error with versions of Tomcat previous to
4.1.x, tho.

Lynn Hollerman.


-
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: Tomcat problems every morning.

2003-06-02 Thread Chong Yu Meng
Hollerman Geralyn M wrote:

Why, yes, I am. And I thought perhaps MySQL was the problem - but I was told
by some people using Oracle and PostgreSQL databases that they'd seen the
problem as well. 

To put it bluntly, don't believe them, Lynn. It seems to me like you've 
done everything necessary to ensure that the problem is not on your 
side. If it looks like a duck, and it quacks like a duck ...

I tried putting in some code to set the driver time-out
value, 

You could write a small program (not a servlet) that polls the database 
(i.e. connect to the database, retrieve some data, disconnect) at 
regular intervals and records to a file both successes and failures. 
Then maybe trigger a server reboot when it detects a connection problem. 
This will add some overhead to both your app server and database server, 
so, be advised. You could run this for a couple of days, just enough to 
collect data to show to the DBA's.

Realistically, though, I doubt that it will change anything. If your DBA 
does not understand the possibility of MySQL dropping/resetting 
connections and hasn't offered to check for you, it's unlikely he will 
accept your results. Maybe I'm just getting bitter and cynical in my 
"old age" :)

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


Re: Tomcat problems every morning.

2003-06-02 Thread Hemendra Rana
The traces that I put yesterday did indeed show that it is the MySQL 
database driver that times out the connection. I have added 
autoReconnect=true to the URL. Lets see if that works. Following is the 
stack trace of the exception that I got:

java.sql.SQLException: Communication link failure: java.io.IOException
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1606)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:886)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:945)
   at com.mysql.jdbc.Connection.execSQL(Connection.java:1809)
   at 
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1458)
   .

Thanks,
Hemendra
Paul (BRI) wrote:

My comment won't be that helpful - but I started out at the same place -
each morning I came in a got a call from staff saying the pages with
content pulled from the dbase was down. 

One thing I know, as others suggested, it has to do with the
JDBC/connection - in our case it happens when the network connection
between our linux box and our sql box os broken at some point - I think
the ISP does late night maintenance on the line (this is setup on an
office DSL line). We are still working to isolate the problem - but it
does seem to be JDBC related. I have tried simply pulling the cable on
the back of one box for a few seconds and the connection does die and
will not reconnect.
I plan to post back to the group when we get a better sense of the
problem - we are still fooling with it. In our case we are using MSSQL
with the MS JDBC driver. I thought I saw a post somewhere that said the
mySQL driver had a autoReconnect=true setting - I think I saw it on the
Apache site.
I hope you figure things out.

Paul

-Original Message-
From: Hollerman Geralyn M [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 01, 2003 9:07 PM
To: Tomcat Users List
Subject: Re: Tomcat problems every morning.

On Sun, 01 Jun 2003 18:14:05 -0700, Hemendra Rana wrote
 

Are you using mysql database on the backend too. Someone here
pointed out that by default, mysql driver times out after every 8 
hours. I still needs to verify whether that is the cause of my 
problem though. Will let you know of my finds.
   

Why, yes, I am. And I thought perhaps MySQL was the problem - but I was
told by some people using Oracle and PostgreSQL databases that they'd
seen the problem as well. I tried putting in some code to set the driver
time-out value, but evidently I didn't do it correctly, as the problem
persisted. I don't see the error with versions of Tomcat previous to
4.1.x, tho.
Lynn Hollerman.

-
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]


Re: Tomcat problems every morning.

2003-06-03 Thread Geralyn M Hollerman
Chong Yu Meng wrote:

> You could write a small program (not a servlet) that polls the database
> (i.e. connect to the database, retrieve some data, disconnect) at
> regular intervals and records to a file both successes and failures.
> Then maybe trigger a server reboot when it detects a connection problem.
> This will add some overhead to both your app server and database server,
> so, be advised. You could run this for a couple of days, just enough to
> collect data to show to the DBA's.

For the stuff I'm working with, *I'm* the DBA. I thought about trying
just what you suggested, but what stopped me was when we had a 4.0.x
version of Tomcat running on another server and it didn't display any of
the "Communication Link Failure" problems I saw; this all cropped up
when I first got my hands on a copy of 4.1.12. I noticed that 4.1.12 was
the first version I had where Tomcat did the connection pooling as well,
although I didn't *think* I was using it - maybe I'd best take a closer
look at that part of the docs!

-- 
Lynn Hollerman.

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



RE: Tomcat problems every morning.

2003-06-03 Thread Januski, Ken
Just out of curiosity have you posted this question to mysql users list now
that you see the problem pointing to mysql?

-Original Message-
From: Hemendra Rana [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 9:33 AM
To: Tomcat Users List
Subject: Re: Tomcat problems every morning.


The traces that I put yesterday did indeed show that it is the MySQL 
database driver that times out the connection. I have added 
autoReconnect=true to the URL. Lets see if that works. Following is the 
stack trace of the exception that I got:

java.sql.SQLException: Communication link failure: java.io.IOException
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1606)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:886)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:945)
at com.mysql.jdbc.Connection.execSQL(Connection.java:1809)
at 
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1458)
.

Thanks,
Hemendra

Paul (BRI) wrote:

>My comment won't be that helpful - but I started out at the same place -
>each morning I came in a got a call from staff saying the pages with
>content pulled from the dbase was down. 
>
>One thing I know, as others suggested, it has to do with the
>JDBC/connection - in our case it happens when the network connection
>between our linux box and our sql box os broken at some point - I think
>the ISP does late night maintenance on the line (this is setup on an
>office DSL line). We are still working to isolate the problem - but it
>does seem to be JDBC related. I have tried simply pulling the cable on
>the back of one box for a few seconds and the connection does die and
>will not reconnect.
>
>I plan to post back to the group when we get a better sense of the
>problem - we are still fooling with it. In our case we are using MSSQL
>with the MS JDBC driver. I thought I saw a post somewhere that said the
>mySQL driver had a autoReconnect=true setting - I think I saw it on the
>Apache site.
>
>I hope you figure things out.
>
>Paul
>
>-Original Message-
>From: Hollerman Geralyn M [mailto:[EMAIL PROTECTED] 
>Sent: Sunday, June 01, 2003 9:07 PM
>To: Tomcat Users List
>Subject: Re: Tomcat problems every morning.
>
>
>On Sun, 01 Jun 2003 18:14:05 -0700, Hemendra Rana wrote
>  
>
>>Are you using mysql database on the backend too. Someone here
>>pointed out that by default, mysql driver times out after every 8 
>>hours. I still needs to verify whether that is the cause of my 
>>problem though. Will let you know of my finds.
>>
>>
>
>Why, yes, I am. And I thought perhaps MySQL was the problem - but I was
>told by some people using Oracle and PostgreSQL databases that they'd
>seen the problem as well. I tried putting in some code to set the driver
>time-out value, but evidently I didn't do it correctly, as the problem
>persisted. I don't see the error with versions of Tomcat previous to
>4.1.x, tho.
>
>Lynn Hollerman.
>
>
>-
>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]


Re: Tomcat problems every morning.

2003-06-03 Thread Chong Yu Meng
Geralyn M Hollerman wrote:

For the stuff I'm working with, *I'm* the DBA. 

Oops ! Sorry to hear that ! I've never had much luck with MySQL myself, 
because it has some pretty funky methods of configuring permissions. I 
use Firebird when I can. Anyway, I'm pretty sure it isn't Tomcat that is 
causing the problems, because it seems that your problem is pretty 
regular (every 8 hours ?). I could be wrong, but I'd look at the 
database. Connection pooling is not enabled by default in Tomcat.

Regards,
pascal chong


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


RE: Tomcat problems every morning.

2003-06-03 Thread Januski, Ken
For what it's worth I use Tomcat 4.0 and mySQL in production environment and
don't have any of the aforementioned problems. I DO restart mySQL from
script on daily basis but I never had any problems that caused me to do so.
I just wanted a daily backup of the database and daily transactions and for
me the simplest way to do it was to just stop the service, do whatever I
needed and then restart. But I had no problems before I switched to the
daily restart.

I'd have to check what version of mySQL and driver that I'm using. You're
probably using newer ones and there may be problems with them that I don't
have with mine.



-Original Message-
From: Chong Yu Meng [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 12:08 PM
To: Tomcat Users List
Subject: Re: Tomcat problems every morning.


Geralyn M Hollerman wrote:

>For the stuff I'm working with, *I'm* the DBA. 
>
Oops ! Sorry to hear that ! I've never had much luck with MySQL myself, 
because it has some pretty funky methods of configuring permissions. I 
use Firebird when I can. Anyway, I'm pretty sure it isn't Tomcat that is 
causing the problems, because it seems that your problem is pretty 
regular (every 8 hours ?). I could be wrong, but I'd look at the 
database. Connection pooling is not enabled by default in Tomcat.

Regards,
pascal chong




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


Re: Tomcat problems every morning.

2003-06-03 Thread Geralyn M Hollerman
"Januski, Ken" wrote:
> 
> For what it's worth I use Tomcat 4.0 and mySQL in production environment and
> don't have any of the aforementioned problems. I DO restart mySQL from
> script on daily basis but I never had any problems that caused me to do so.
> I just wanted a daily backup of the database and daily transactions and for
> me the simplest way to do it was to just stop the service, do whatever I
> needed and then restart. But I had no problems before I switched to the
> daily restart.

That is exactly the case for me. We have a 4.0.4 version of Tomcat
running here with no problems like I've been describing - those problems
are limited to 4.1.x versions that I've tried. 
-- 
Lynn Hollerman.

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