Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1881

Java application CPU 100% when mongod replica set member is stopped

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.0
    • Affects Version/s: 3.0.0
    • None
    • Environment:

      The non-default configuration options used by the application:

      readPreference: nearest
      cluster:
        hosts: mongodb-oracle-a1-ci-set1, mongodb-oracle-b1-ci-set1, mongodb-oracle-c1-ci-set1
      codeRegistry: jackson (https://github.com/ylemoigne/mongo-jackson-codec)
      

      We have a replica set with 3 members, identified by host names mongodb-oracle-a1-ci-set1, mongodb-oracle-b1-ci-set1, and mongodb-oracle-c1-ci-set1. There is a Java application running on a fourth host. If I stop any one of the mongod daemons, primary or secondary, while the application is running, CPU for the application process goes to 100% and the application is unusable until restarted. I can replicate the issue consistently.

      Attached is the log output when replicating the issue.

      1. The application is started with mongodb-oracle-a1-ci-set1 daemon stopped. Everything looks fine. The other two daemons are operating normally.
      2. At about 20:24:23, I start mongod on mongodb-oracle-a1-ci-set1. Everything looks fine. The new member joins the replica set and the log indicates that the application connects to it.
      3. At about 20:25:05, I stop mongod on mongodb-oracle-a1-ci-set1. The application process CPU goes to 100%. From the logs, it looks like the application still thinks its connected to the missing member.
        4. At about 20:26:04, I start the mongod on mongodb-oracle-a1-ci-set1. The application process CPU remains at 100%.

      Note that no mongo queries are executed. The application is sitting idle when all this occurs. Once in a bad state, the application is unresponsive and must be restarted.

        1. app.log
          32 kB
          Cory Thomas
        2. mongo-driver-test.tar.gz
          2 kB
          Cory Thomas

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            cthomas Cory Thomas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: