4 Replies Latest reply on Nov 14, 2001 10:13 PM by toddhunter

    Database disconnect during night

    rune

      Hi
      If my application is idle for some time, the connection to my database is lost, and the first request for persistant data will fail. The second one is allways ok. I am not sure how long the idle period must be for this error to occur, but the first request in the morning does allways fail.

      I'am using JBoss 2.4.1 on Redhat Linux 7.1, MySql 3.23.36 with JDBC driver mm.mysql-2.0.4-bin.jar.

      My data source configuration in jboss.jcml is like this:

      DefaultDS
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
      jdbc:mysql:///<db name>
      mymobile
      test

      1200000
      10
      false
      false
      false
      true
      120000
      1800000
      false
      false
      1.0
      0


      Hope anyone can help, because this is the last issue before we can go online with a commercial service using JBoss.

      Rune Hamnvik
      Mobinor AS
      Norway

        • 1. Re: Database disconnect during night
          fbiaggi

          Use:
          autoReconnect=true
          on the mm jdbc driver parameters.

          Ciao

          • 2. Re: Database disconnect during night
            davidjencks

            This is turning into a frequent question...

            Ok, I think in pre 3.0 jboss you set


            900000
            true
            900000
            true

            and all connections idled for more than 15 min (900,000 millisec) will be disposed of (and replaced if minSize > 0).

            If this doesn't work please let us know.

            • 3. Re: Database disconnect during night
              isik-a

              Hi,

              I have the same problem and it is still going on.
              It doesn't work on my system.The idle period is only decreased to about 15 min.

              • 4. Re: Database disconnect during night
                toddhunter

                I have had the same problem both with MySQL and SapDB. Both remedies suggested above don't seem to help. Any more info on auto-reconnect? It seems to me that this works and it does reconnect, but it still means the first attempt is lost.
                This is a big problem as it means if I set cron jobs up, I won't be confident that they will always succeed.

                Anyone solved this problem?