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

PeriodicExecutor "cannot join thread before it is started"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      RHEL7, python 2.7.5, MongoDB 3.2.1

      Description

      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...

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: