Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4168

mongoc driver keeps reconnecting to the server ?

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Cannot Reproduce
    • Icon: Unknown Unknown
    • None
    • None
    • None
    • None

    Description

      wih latest mongo c lib 19.1 and mongodb community 5.0.2 I find a LOT of sockets in timed_wait (client is on windows 7) 

      there appears to me to be constant needless socket allocation to a stable mongodb

      c:\temp\mongo-c-driver-1.19.0\mongo-c-driver-1.19.0\src\libmongoc\src\mongoc\mongoc-cluster.c

      mongoc_cluster_fetch_stream_pooled

      cluster_node = _mongoc_cluster_add_node (cluster, server_id, error);

       

      I obtain different clients from a single mongoc_client_pool_t

      in the connection url I put these as high as possible but there doesn't seem to be considering them, it seems to allocate sockets irrespectively 

      heartbeatfrequencyms=1000000

      socketCheckIntervalMS=1000000

      what could I do to stop it leaking sockets ?

       

       

      Attachments

        1. example-update_socket_leak.c
          7 kB
        2. example-update.c
          3 kB
        3. example-update1.c
          4 kB

        Activity

          People

            kevin.albertson@mongodb.com Kevin Albertson
            g.fanini@gmail.com G F
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: