5 Replies Latest reply on Oct 8, 2003 3:00 PM by the_bone_ranger

    JBoss hangs

    the_bone_ranger

      I'm using jboss-3.2.2RC4.
      I had one case where calls to my beans were hanging forever.
      Every time a new person accessed my login page, this error would happen.
      Restarting JBoss solved the problem.
      I'm using purely CMP on a mysql db

      The problem occured after JBoss had been running for a couple of weeks.
      Doing a kill -3 on JBoss gave me a list of active threads, and some of these appear to be waiting for the database (I assume executing login finder method).

      Any ideas?

        • 1. Re: JBoss hangs
          the_bone_ranger

          Has anyone seen JBoss mysteriously hanging for no good reason?

          • 2. Re: JBoss hangs

            Care to share your threaddump or don't you want any help?

            If the threads are waiting on the database, the problem
            is in your database.

            Regards,
            Adrian

            • 3. Re: JBoss hangs
              the_bone_ranger

              Here's the dump.

              I thought the database / driver might be causing the problem somehow, but it still doesn't make sense to me.

              I tried a test where I locked a table in the database manually. Then I used my app to try and access that table (via jboss).

              After a few seconds, JBoss threw a timeout exception.
              Why didn't JBoss timeout for the bug I saw if it's working properly?


              I'm using:
              mysql 4.0.12,
              mysql-connector-java-3.0.8-stable-bin.jar
              jboss-3.2.2RC4
              linux
              java 1.4.2

              • 4. Re: JBoss hangs

                If you are doing things like table locks in the database,
                you should use instance-per-transaction
                container configuration in jboss.xml
                (to run without the in memory jboss lock)

                JBoss does not know about this kind of locking so deadlocks can
                happen if the locks are taken in different orders.
                Was this just a test?

                The timeout is a transaction timeout correct?
                JBoss interrupts the thread that timed out.

                Either, you didn't have a transaction or
                the mysql driver is ignoring the request to be interrupted.

                Of course, you might just have a bug in the driver,
                do you have the latest version?

                Regards,
                Adrian

                • 5. Re: JBoss hangs
                  the_bone_ranger

                  HAS ANYONE ELSE SEEN JBOSS HANG AFTER IT HAS PREVOIUSLY BEEN RUNNING OK?

                  WHAT DB, DB DRIVER, JBOSS, OS & JAVA VERSIONS DID U HAVE?

                  Sorry, I was a bit vauge, I locked the db for a test just to see what jboss would do if it couldn't get a lock.

                  When it happened, I had the latest version of mysql and second to latest version of the driver.

                  I had a transaction.

                  I agree "the mysql driver is ignoring the request to be interrupted" could possibly be the single cause. In which case, I'd expect only mysql users to experience this.

                  However, would this theory be consistient with the following behaviour?
                  - Every time a new user accessed the system, it would hang. After it happened once, it happened everytime.

                  Do JDBC drivers maintain a state that would allow themselves to lock up like this? Seems strange that they would, this is why I'm confused!!!

                  Thanks for your help so far,
                  Bone