2 Replies Latest reply on Apr 10, 2003 3:21 PM by tverdota

    Connection failiure

    jonas_e

      Hi all. I have a connection problem. Here goes:

      My setup: JBoss-Tomcat 2.4.1/3.2.3, Mysql 3.23.36, mm.mysql-2.0.4.
      My Scenario: I connect to Mysql through a lookup to a connection defined i jboss.jcml like so:


      aDS
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
      jdbc:mysql://my-server/my-db
      my-user
      0
      my-pwd
      false
      false
      120000
      1800000
      false
      true
      1



      My problem is this: Every now and then I get java.sql.SQLException ->"lost connection during query". If I try the action again it usually fails one more time, then works like a charm. It never fails for more than two times in a row, though.

      Anybody know why this happens? Is it a mysql problem? a jdbc problem? Is my jboss.jcml incorrecly configured?
      I really have no clue, and would greatly appreciate any pointers.

      Cheers,

      /Jonas Eklöf

        • 1. Re: Connection failiure
          davidjencks

          It looks to me as if it is a problem with mysql, and the jdbc driver is telling you, rather than jboss. Is there any indication in a mysql log that it had a problem?

          Also, it is doubtful that you really want the pool maxsize < minsize. Especially with these non-xa connections, you need at least as many connections as you can have simultaneous transactions.

          • 2. Re: Connection failiure
            tverdota

            Hi,

            I used the older version of JBOSS and driver to avoid problems with the examples I have.
            They was developed in a similar environment. I hoped it will be more simple.

            I tried the new driver of MySQL (mysql-connector-java-3.0.6-stable) with jboss-3.0.6_tomcat-4.1.18 I got the same problem. There are no other error message in the log.

            I installed the new versions:
            (Win2K, jboss-3.2.0RC4_tomcat-4.1.18, mysql-connector-java-3.0.6-stable, mysql-4.0.12)
            with exact the same configuration and it works.