I have also seen this with the following setup.

Solaris 8 on Sun Sparc
Java 1.3.1_04
Tomcat 4.1.8/Jasper 1
mm.mysql 2.0.14
Apache 1.3.26 with mod_jk and Ajp13 connector.
DBCP

In my case from reviewing all of the tomcat logs I found that the
Communication link failure looks like a symptom of some other failure.
When reviewing my Engine logs for the ajp connector it looks
like Tomcat was not completing requests for a period of 5 minutes.
I saw a cascading of log entries like this in a 5 minute period where
over 100 new Ajp13Processor's were started.

2002-08-25 10:20:11 Ajp13Processor[8009][184] Starting background thread

I have seen this same behaviour a number of times, and each time the
length of the problem is about 5 minutes long.

I have also checked the CPU load stats for these time periods and I
am seeing the load increase by a factor of 3 while this is happening.
To a load > 1 on a single CPU system.

I checked the mysqld error logs, no errors reported.

These weren't due to a spike in the number of requests. And there was no
start/stop/reload of any Contexts which triggered this.  No JSP pages
were recompiled at the times this happened.  Nothing was changed.

I also start Tomcat with the java arg "-verbose:gc" so that garbage
collection data is logged.   I reviewed the GC times and I have several
long Full GC's of 15 and 22 seconds which might explain some of the
problems, but not a problem that seems to last 5 minutes.

I bet a thread stack dump while this is going on would be very interesting
reading.

I don't know yet what the source of my problem is.  The system Tomcat
is running on will be upgraded to faster dual CPU's and another 512MB of ram
in the next week or so.  Perhaps that will help.

I just thought the trouble shooting process I went through might help
you do forensics on your logs so you can track down your problem.

Regards,

Glenn

Paul Phillips wrote:
> I have used the Mark Matthews MySQL jdbc driver with Tomcat on three or 
> four projects and never had any trouble.
> 
> I recently started using the newest version of the driver, now called 
> MySQL Connector/J version 3.0.0 beta.  I am using it with Tomcat 4.1.9 
> on a Sun Ultra 5 with Solaris 9.  I am also using the DBCP connection 
> pool as described in the 4.1 docs.
> 
> I have never used this combination (the particular machine, Sol 9, this 
> new version of Tomcat and this driver) together to do database lookups 
> before, so I'm not sure where to look for the trouble.
> 
> However - the trouble is this...
> 
> I just installed my webapp a couple of days ago, for use in low level 
> production (meaning if there are problems, it is not the end of the 
> world...)
> 
> Each morning, when I come in, and fire up my webapp, the database 
> connections don't work.  The Tomcat logs report this:
> 
> java.sql.SQLException: Communication link failure: java.net.SocketException
>        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:810)
>        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1265)
>        at com.mysql.jdbc.Connection.execSQL(Connection.java:1935)
>        at 
> com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1800)
>        at 
> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:445)
>        at 
> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
>        at 
> org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthen
> ticator.java:263)
> 
> and etc back through the trace.
> 
> So there is some problem with the socket.  If I simply shutdown and 
> restart Tomcat, the problem goes away and my app works fine and happily 
> all day long.
> 
> So, what would cause this to happen?  Connection pool problem?  Driver 
> problem?  I don't even know where to start looking...  I would 
> appreciate any ideas.
> 
> Regards,
> Paul Phillips
> 
> -- 
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>




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

Reply via email to