You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Hemendra Rana <to...@ranas.us> on 2003/06/01 19:31:15 UTC

Tomcat problems every morning.

Hi,

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.

Any help will be appreciated.

Thanks,
Hemendra

2003-06-01 08:32:31 ApplicationDispatcher[] Servlet.service() for 
servlet jsp threw exception
org.apache.jasper.JasperException: Communication link failure: 
java.io.IOException
        at org.apache.jasper.servlet.JspServletWrapper.service(Unknown 
Source)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown 
Source)
        at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(Unknown 
Source)
        at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(Unknown Source)
        at 
org.apache.catalina.core.ApplicationDispatcher.include(Unknown Source)
        at org.apache.jasper.runtime.JspRuntimeLibrary.include(Unknown 
Source)
        at org.apache.jsp.index_jsp._jspService(index_jsp.java:98)
        at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at org.apache.jasper.servlet.JspServletWrapper.service(Unknown 
Source)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown 
Source)
        at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown 
Source)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
        at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown 
Source)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown 
Source)
        at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
        at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
        at org.apache.catalina.core.StandardContextValve.invoke(Unknown 
Source)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown 
Source)




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat problems every morning.

Posted by Chong Yu Meng <ch...@cymulacrum.net>.
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat problems every morning.

Posted by Geralyn M Hollerman <gm...@louisiana.edu>.
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat problems every morning.

Posted by Chong Yu Meng <ch...@cymulacrum.net>.
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat problems every morning.

Posted by Hemendra Rana <to...@ranas.us>.
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:gmh2441@louisiana.edu] 
>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: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat problems every morning.

Posted by "Paul (BRI)" <ph...@briconsultingroup.com>.
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:gmh2441@louisiana.edu] 
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat problems every morning.

Posted by Hollerman Geralyn M <gm...@louisiana.edu>.
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat problems every morning.

Posted by Hemendra Rana <to...@ranas.us>.
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: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat problems every morning.

Posted by Hollerman Geralyn M <gm...@louisiana.edu>.
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat problems every morning.

Posted by Jason Bainbridge <ja...@jblinux.org>.
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 
webmaster@kde.org 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org