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

Facing " connection pool paused" issue after upgrading pymongo from 3.12.3 to python 4.1.0

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker - P1
    • Resolution: Fixed
    • None
    • 4.2
    • None
    • None

    Description

      This is a copy of the full logs. Our code works fine for pymongo v 3.12.3
       
       
      Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/celery/app/trace.py", line 451, in trace_task
      R=retval=fun(*args, **kwargs)
      File "/usr/local/lib/python3.9/site-packages/celery/app/trace.py", line 734, in _protected_call_
      returnself.run(*args, **kwargs)
      File "/scraper/app/tasks/insurances/a_scraper_task.py", line 25, in scraper_a
      returnbase_scraper_a(
      File "/scraper/app/tasks/common/base_a_scraper_task.py", line 38, in base_scraper_a
      otp = scraper.wait_for_otp(request_id)
      File "/scraper/app/services/base_scraper.py", line 175, in wait_for_otp
      with db.scraper_tasks.watch(pipeline, full_document="updateLookup") as stream:
      File "/usr/local/lib/python3.9/site-packages/pymongo/collection.py", line 2571, in watch
      returnCollectionChangeStream(
      File "/usr/local/lib/python3.9/site-packages/pymongo/change_stream.py", line 131, in _init_
      self._cursor =self._create_cursor()
      File "/usr/local/lib/python3.9/site-packages/pymongo/change_stream.py", line 221, in _create_cursor
      returnself._run_aggregation_cmd(session=s, explicit_session=self._session isnotNone)
      File "/usr/local/lib/python3.9/site-packages/pymongo/change_stream.py", line 215, in _run_aggregation_cmd
      returnself._client._retryable_read(
      File "/usr/local/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1365, in _retryable_read
      withself._socket_from_server(read_pref, server, session) as (sock_info, read_pref):
      File "/usr/local/lib/python3.9/contextlib.py", line 119, in _enter_
      returnnext(self.gen)
      File "/usr/local/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1221, in _socket_from_server
      withself._get_socket(server, session) as sock_info:
      File "/usr/local/lib/python3.9/contextlib.py", line 119, in _enter_
      returnnext(self.gen)
      File "/usr/local/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1156, in _get_socket
      with server.get_socket(handler=err_handler) as sock_info:
      File "/usr/local/lib/python3.9/contextlib.py", line 119, in _enter_
      returnnext(self.gen)
      File "/usr/local/lib/python3.9/site-packages/pymongo/pool.py", line 1379, in get_socket
      sock_info = self._get_socket()
      File "/usr/local/lib/python3.9/site-packages/pymongo/pool.py", line 1444, in _get_socket
      self._raise_if_not_ready(emit_event=True)
      File "/usr/local/lib/python3.9/site-packages/pymongo/pool.py", line 1415, in _raise_if_not_ready
      _raise_connection_failure(self.address, AutoReconnect("connection pool paused"))
      File "/usr/local/lib/python3.9/site-packages/pymongo/pool.py", line 273, in _raise_connection_failure
      raiseAutoReconnect(msg) from error
      pymongo.errors.AutoReconnect: db-dev-shard-00-01.tpfr3.mongodb.net:27017: connection pool paused

      Attachments

        Issue Links

          Activity

            People

              shane.harvey@mongodb.com Shane Harvey
              ken.wangtm@gmail.com Kenneth Wang
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: