Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1050

PeriodicExecutor "cannot join thread before it is started"

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.1
    • Affects Version/s: 3.2
    • Component/s: None
    • None
    • Environment:
      RHEL7, python 2.7.5, MongoDB 3.2.1

      I have a fast cron job running in 5min intervals:

      conn = MongoClient(...)

      1. quick find() lookup, using indexes
        conn.close()

      About once a week I receive traceback error:

      Traceback (most recent call last):
      File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
      func(*targs, **kargs)
      File "/usr/lib64/python2.7/site-packages/pymongo/periodic_executor.py", line 142, in _shutdown_executors
      executor.join(1)
      File "/usr/lib64/python2.7/site-packages/pymongo/periodic_executor.py", line 81, in join
      self._thread.join(timeout)
      File "/usr/lib64/python2.7/threading.py", line 939, in join
      raise RuntimeError("cannot join thread before it is started")
      RuntimeError: cannot join thread before it is started

      MongoDB is using replica set, if that matters...

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            kimheino Kim B. Heino
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: